"use client"; import { FC } from "react"; import { Box, Grid, Typography, List, ListItemButton, ListItemIcon, ListItemText, ListItemSecondaryAction, Drawer, } from "@mui/material"; import { ExpandCircleDown as ExpandCircleDownIcon, AccountCircle as AccountCircleIcon, Chat as ChatIcon, PermPhoneMsg as PhoneIcon, WhatsApp as WhatsAppIcon, Facebook as FacebookIcon, AirlineStops as AirlineStopsIcon, } from "@mui/icons-material"; import { usePathname } from "next/navigation"; import Link from "next/link"; import Image from "next/image"; import { typography, fonts } from "ui"; import LinkLogo from "@/app/_images/link-logo-small.png"; import { useSession, signOut } from "next-auth/react"; const openWidth = 270; const closedWidth = 70; const MenuItem = ({ name, href, Icon, iconSize, inset = false, selected = false, open = true, badge, target = "_self", }: any) => ( {iconSize > 0 ? ( ) : ( )} {open && ( {name} } /> )} {badge && badge > 0 ? ( {badge} ) : null} ); interface SidebarProps { open: boolean; setOpen: (open: boolean) => void; } export const Sidebar: FC = ({ open, setOpen }) => { const pathname = usePathname(); const { poppins } = fonts; const { bodyLarge } = typography; const { data: session } = useSession(); const user = session?.user; // const logout = () => { // signOut({ callbackUrl: "/login" }); // }; return ( { setOpen!(!open); }} > Link logo . {open && ( CDR Bridge )} {user?.image && ( Profile image )} {open && ( {user?.email} )} ); };