diff --git a/components/layout/Navbar.tsx b/components/layout/Navbar.tsx new file mode 100644 index 0000000..6e08f48 --- /dev/null +++ b/components/layout/Navbar.tsx @@ -0,0 +1,7 @@ +import { getAllCategories } from '@/lib/directus' +import NavbarClient from './NavbarClient' + +export default async function Navbar() { + const categories = await getAllCategories() + return +} diff --git a/components/layout/NavbarClient.tsx b/components/layout/NavbarClient.tsx new file mode 100644 index 0000000..a3bb6bb --- /dev/null +++ b/components/layout/NavbarClient.tsx @@ -0,0 +1,60 @@ +'use client' + +import Link from 'next/link' +import { usePathname } from 'next/navigation' +import { Search } from 'lucide-react' +import type { Category } from '@/lib/types' + +interface Props { + categories: Category[] +} + +export default function NavbarClient({ categories }: Props) { + const pathname = usePathname() + + function openSearch() { + window.dispatchEvent(new CustomEvent('kotobane:open-search')) + } + + return ( + + ) +}