feat: create a banner with custom text by admin

This commit is contained in:
Ephraim Atta-Duncan
2024-02-22 20:13:17 +00:00
parent 15e191f62d
commit c436559787
15 changed files with 291 additions and 12 deletions

View File

@ -1,11 +1,11 @@
'use client';
import { HTMLAttributes } from 'react';
import type { HTMLAttributes } from 'react';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { BarChart3, FileStack, User2, Wallet2 } from 'lucide-react';
import { BadgeAlert, BarChart3, FileStack, User2, Wallet2 } from 'lucide-react';
import { cn } from '@documenso/ui/lib/utils';
import { Button } from '@documenso/ui/primitives/button';
@ -78,6 +78,20 @@ export const AdminNav = ({ className, ...props }: AdminNavProps) => {
Subscriptions
</Link>
</Button>
<Button
variant="ghost"
className={cn(
'justify-start md:w-full',
pathname?.startsWith('/admin/banner') && 'bg-secondary',
)}
asChild
>
<Link href="/admin/banner">
<BadgeAlert className="mr-2 h-5 w-5" />
Banner
</Link>
</Button>
</div>
);
};