39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
|
|
|
|
import { LiveryGallery } from '@/components/profile/LiveryGallery';
|
|
import { routes } from '@/lib/routing/RouteConfig';
|
|
import type { ProfileLiveriesViewData } from '@/lib/view-data/ProfileLiveriesViewData';
|
|
import { Box } from '@/ui/Box';
|
|
import { Button } from '@/ui/Button';
|
|
import { Heading } from '@/ui/Heading';
|
|
import { Stack } from '@/ui/Stack';
|
|
import { Plus } from 'lucide-react';
|
|
import Link from 'next/link';
|
|
|
|
interface ProfileLiveriesTemplateProps {
|
|
viewData: ProfileLiveriesViewData;
|
|
}
|
|
|
|
export function ProfileLiveriesTemplate({ viewData }: ProfileLiveriesTemplateProps) {
|
|
return (
|
|
<Stack gap={8}>
|
|
<Box as="header">
|
|
<Stack direction="row" justify="between" align="center">
|
|
<Heading level={1}>My Liveries</Heading>
|
|
<Link href={routes.protected.profileLiveryUpload}>
|
|
<Button variant="primary" size="sm" icon={<Plus size={16} />}>
|
|
Upload Livery
|
|
</Button>
|
|
</Link>
|
|
</Stack>
|
|
</Box>
|
|
|
|
<Box as="main">
|
|
<LiveryGallery
|
|
liveries={viewData.liveries}
|
|
/>
|
|
</Box>
|
|
</Stack>
|
|
);
|
|
}
|