Skip to content

Commit

Permalink
add New Collection button on collections page
Browse files Browse the repository at this point in the history
  • Loading branch information
olexh committed Mar 27, 2024
1 parent 8fabc47 commit b21c376
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/(pages)/collections/(collections)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import _generateMetadata from '@/utils/generateMetadata';
import getQueryClient from '@/utils/getQueryClient';

import CollectionList from './_components/collection-list';
import Link from 'next/link';
import MaterialSymbolsAddRounded from '~icons/material-symbols/add-rounded';
import { Button } from '@/components/ui/button';


export async function generateMetadata(): Promise<Metadata> {
Expand Down Expand Up @@ -57,7 +60,13 @@ const Component = async ({
<HydrationBoundary state={dehydratedState}>
<div className="flex flex-col gap-8">
<div className="flex items-center justify-between gap-4">
<SubHeader title="Колекції" />
<SubHeader title="Колекції">
{auth && <Button asChild size="icon-sm" variant="outline">
<Link href="/collections/new">
<MaterialSymbolsAddRounded />
</Link>
</Button>}
</SubHeader>
<CollectionSort />
</div>
<CollectionList page={Number(page)} sort={sort} />
Expand Down

0 comments on commit b21c376

Please sign in to comment.