website refactor
This commit is contained in:
@@ -3,13 +3,11 @@
|
||||
import type { Result } from '@/lib/contracts/Result';
|
||||
import type { ProfileViewData } from '@/lib/view-data/ProfileViewData';
|
||||
import { ProfileSettingsTemplate } from '@/templates/ProfileSettingsTemplate';
|
||||
import {
|
||||
SharedBox,
|
||||
SharedStack,
|
||||
SharedText,
|
||||
SharedIcon,
|
||||
SharedProgressLine
|
||||
} from '@/components/shared/UIComponents';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { ProgressLine } from '@/components/shared/ProgressLine';
|
||||
import { ShieldAlert } from 'lucide-react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useState } from 'react';
|
||||
@@ -46,19 +44,19 @@ export function ProfileSettingsPageClient({ viewData, onSave }: ProfileSettingsP
|
||||
|
||||
return (
|
||||
<>
|
||||
<SharedProgressLine isLoading={isSaving} />
|
||||
<ProgressLine isLoading={isSaving} />
|
||||
{error && (
|
||||
<SharedBox position="fixed" top={4} right={4} zIndex={50} maxWidth="md">
|
||||
<SharedBox bg="bg-error-red/10" p={4} rounded="md" border borderColor="border-error-red/20">
|
||||
<SharedStack direction="row" align="center" gap={3}>
|
||||
<SharedIcon icon={ShieldAlert} size={5} color="text-error-red" />
|
||||
<SharedBox>
|
||||
<SharedText weight="bold" color="text-error-red">Update Failed</SharedText>
|
||||
<SharedText size="sm" color="text-error-red/80">{error}</SharedText>
|
||||
</SharedBox>
|
||||
</SharedStack>
|
||||
</SharedBox>
|
||||
</SharedBox>
|
||||
<Box position="fixed" top={4} right={4} zIndex={50} maxWidth="md">
|
||||
<Box bg="var(--ui-color-bg-surface)" p={4} rounded="md" border borderColor="var(--ui-color-intent-critical)">
|
||||
<Stack direction="row" align="center" gap={3}>
|
||||
<Icon icon={ShieldAlert} size={5} color="var(--ui-color-intent-critical)" />
|
||||
<Box>
|
||||
<Text weight="bold" variant="critical">Update Failed</Text>
|
||||
<Text size="sm" variant="low">{error}</Text>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Box>
|
||||
</Box>
|
||||
)}
|
||||
<ProfileSettingsTemplate
|
||||
viewData={viewData}
|
||||
|
||||
Reference in New Issue
Block a user