"use client"; import Link from "next/link"; import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Bell, Heart, Wallet, ChartPie, CalendarClock, Calendar } from "lucide-react"; import { LogoutButton } from "@/components/auth/logoutButton"; import { useUserRole } from "@/hooks/useUserRole"; import CustomTooltip from "../customToolTip"; interface AuthenticatedComponentsProps { uid: string; avatarUrl?: string | null; notificationCount: number; } export const AuthenticatedComponents = ({ uid, avatarUrl, notificationCount }: AuthenticatedComponentsProps) => { const { data } = useUserRole(); const businessClass = data?.role === "business" ? "border-2 border-[#FFD700] bg-[#FFF8DC] dark:bg-[#4B3E2B] rounded-md p-1" : ""; return (
{notificationCount >= 1 && (
{notificationCount}
)}
{data?.role === "investor" && (
)} {/*chart pie icon for bussiness's dashboard */} {data?.role === "business" && (
)} Profile {data?.role === "admin" && ( Admin )} {data?.role === "business" && ( <> Calendar )} {data != null && data != undefined && data.role === "business" && ( Dataroom )}
); };