import Link from "next/link"; import SidebarItems from "./SidebarItems"; import { Avatar, AvatarFallback } from "./ui/avatar"; import { AuthSession, getUserAuth } from "@/lib/auth/utils"; const Sidebar = async () => { const session = await getUserAuth(); if (session.session === null) return null; return ( ); }; export default Sidebar; const UserDetails = ({ session }: { session: AuthSession }) => { if (session.session === null) return null; const { user } = session.session; if (!user?.name || user.name.length == 0) return null; return (

{user.name ?? "John Doe"}

{user.email ?? "john@doe.com"}

{user.name ? user.name ?.split(" ") .map((word) => word[0].toUpperCase()) .join("") : "~"}
); };