This commit updates the naming convention of icons from Lucide-React, moving some package dependencies to "peerDependencies" in 'team-accounts', 'admin' and 'auth'. Additionally, it includes tweaks to the development server command in apps/web package.json and adds a logger reference to the shared package. Furthermore, cleanup work has been performed within the features and UI packages, and new scripts to interact with Stripe have been added to the root package.json.
103 lines
2.3 KiB
TypeScript
103 lines
2.3 KiB
TypeScript
import Link from 'next/link';
|
|
|
|
import { Menu } from 'lucide-react';
|
|
|
|
import {
|
|
DropdownMenu,
|
|
DropdownMenuContent,
|
|
DropdownMenuItem,
|
|
DropdownMenuTrigger,
|
|
} from '@kit/ui/dropdown-menu';
|
|
import {
|
|
NavigationMenu,
|
|
NavigationMenuItem,
|
|
NavigationMenuList,
|
|
} from '@kit/ui/navigation-menu';
|
|
|
|
const links = {
|
|
SignIn: {
|
|
label: 'Sign In',
|
|
path: '/auth/sign-in',
|
|
},
|
|
Blog: {
|
|
label: 'Blog',
|
|
path: '/blog',
|
|
},
|
|
Docs: {
|
|
label: 'Documentation',
|
|
path: '/docs',
|
|
},
|
|
Pricing: {
|
|
label: 'Pricing',
|
|
path: '/pricing',
|
|
},
|
|
FAQ: {
|
|
label: 'FAQ',
|
|
path: '/faq',
|
|
},
|
|
};
|
|
|
|
export function SiteNavigation() {
|
|
const className = `hover:underline text-sm`;
|
|
|
|
return (
|
|
<>
|
|
<div className={'hidden items-center lg:flex'}>
|
|
<NavigationMenu>
|
|
<NavigationMenuList className={'space-x-2.5'}>
|
|
<NavigationMenuItem>
|
|
<Link className={className} href={links.Blog.path}>
|
|
{links.Blog.label}
|
|
</Link>
|
|
</NavigationMenuItem>
|
|
<NavigationMenuItem>
|
|
<Link className={className} href={links.Docs.path}>
|
|
{links.Docs.label}
|
|
</Link>
|
|
</NavigationMenuItem>
|
|
<NavigationMenuItem>
|
|
<Link className={className} href={links.Pricing.path}>
|
|
{links.Pricing.label}
|
|
</Link>
|
|
</NavigationMenuItem>
|
|
|
|
<NavigationMenuItem>
|
|
<Link className={className} href={links.FAQ.path}>
|
|
{links.FAQ.label}
|
|
</Link>
|
|
</NavigationMenuItem>
|
|
</NavigationMenuList>
|
|
</NavigationMenu>
|
|
</div>
|
|
|
|
<div className={'flex items-center lg:hidden'}>
|
|
<MobileDropdown />
|
|
</div>
|
|
</>
|
|
);
|
|
}
|
|
|
|
function MobileDropdown() {
|
|
return (
|
|
<DropdownMenu>
|
|
<DropdownMenuTrigger aria-label={'Open Menu'}>
|
|
<Menu className={'h-9'} />
|
|
</DropdownMenuTrigger>
|
|
|
|
<DropdownMenuContent>
|
|
{Object.values(links).map((item) => {
|
|
const className = 'flex w-full h-full items-center';
|
|
|
|
return (
|
|
<DropdownMenuItem key={item.path}>
|
|
<Link className={className} href={item.path}>
|
|
{item.label}
|
|
</Link>
|
|
</DropdownMenuItem>
|
|
);
|
|
})}
|
|
</DropdownMenuContent>
|
|
</DropdownMenu>
|
|
);
|
|
}
|