"use client"; import { useState, useEffect } from "react"; import Link from "next/link"; import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Skeleton } from "@/components/ui/skeleton"; import { Bell, Heart, Wallet } from "lucide-react"; import { LogoutButton } from "@/components/auth/logoutButton"; import useSession from "@/lib/supabase/useSession"; const UnAuthenticatedComponents = () => { return (
); }; const AuthenticatedComponents = ({ uid }: { uid: string }) => { let notifications = 100; const displayValue = notifications >= 100 ? "..." : notifications; return (
{displayValue}
Profile Settings Support
); }; export function ProfileBar() { const { session } = useSession(); const user = session?.user; const [sessionLoaded, setSessionLoaded] = useState(false); useEffect(() => { if (!session) { setSessionLoaded(true); } }, [session]); return ( <> {sessionLoaded ? ( user ? ( ) : ( ) ) : (
)} ); }