import * as React from "react"; import Link from "next/link"; import Image from "next/image"; import { cn } from "@/lib/utils"; import { Separator } from "@/components/ui/separator"; import { ThemeToggle } from "@/components/theme-toggle"; import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, } from "@/components/ui/navigation-menu"; import { SearchBar } from "./serchBar"; import { AuthenticatedComponents } from "./AuthenticatedComponents"; import { UnAuthenticatedComponents } from "./UnAuthenticatedComponents"; import { createSupabaseClient } from "@/lib/supabase/serverComponentClient"; import { getUserId } from "@/lib/supabase/actions/getUserId"; import { getUnreadNotificationCountByUserId } from "@/lib/data/notificationQuery"; const ListItem = React.forwardRef, React.ComponentPropsWithoutRef<"a">>( ({ className, title, children, ...props }, ref) => { return (
  • {title}

    {children}

  • ); } ); ListItem.displayName = "ListItem"; export async function NavigationBar() { const client = createSupabaseClient(); const userId = await getUserId(); const { data: avatarUrl } = await client.from("profiles").select("avatar_url").eq("id", userId).single(); let notification_count = 0; if (userId != null) { const { count: notiCount, error: notiError } = (await getUnreadNotificationCountByUserId(client, userId)) ?? {}; notification_count = notiError ? 0 : (notiCount ?? 0); } else { notification_count = 0; } const businessComponents = [ { title: "Business", href: "/business/apply", description: "Apply to raise on on B2DVentures", }, ]; const projectComponents = [ { title: "Projects", href: "/project/apply", description: "Start your new project on B2DVentures", }, ]; const dataroomComponents = [ { title: "Overview", href: "/dataroom/overview", description: "View all dataroom available to you", }, ]; return (
    ); }