diff --git a/client/src/Components/v2/design-elements/Avatar.tsx b/client/src/Components/v2/design-elements/Avatar.tsx index 1adec4741..74c06f8f3 100644 --- a/client/src/Components/v2/design-elements/Avatar.tsx +++ b/client/src/Components/v2/design-elements/Avatar.tsx @@ -8,7 +8,7 @@ interface AvatarProps { src?: string; small?: boolean; sx?: object; - onClick?: Function; + onClick?: (event: React.MouseEvent) => void; } export const Avatar = ({ src, small, sx, onClick = () => {} }: AvatarProps) => { @@ -17,7 +17,6 @@ export const Avatar = ({ src, small, sx, onClick = () => {} }: AvatarProps) => { if (!user) return null; const style = small ? { width: 32, height: 32 } : { width: 64, height: 64 }; - const border = small ? 1 : 3; const [image, setImage] = useState(); useEffect(() => { diff --git a/client/src/Components/v2/sidebar/Authfooter.tsx b/client/src/Components/v2/sidebar/Authfooter.tsx index cc84dc0e2..3194cf44a 100644 --- a/client/src/Components/v2/sidebar/Authfooter.tsx +++ b/client/src/Components/v2/sidebar/Authfooter.tsx @@ -6,7 +6,6 @@ import IconButton from "@mui/material/IconButton"; import { Avatar, Icon } from "@/Components/v2/design-elements"; import Menu from "@mui/material/Menu"; import MenuItem from "@mui/material/MenuItem"; -import Divider from "@mui/material/Divider"; import { MoreVertical, LogOut } from "lucide-react"; import { useTheme } from "@mui/material"; @@ -97,7 +96,6 @@ const AuthFooter = ({ return ( @@ -240,7 +233,6 @@ const AuthFooter = ({ fontSize: 12, whiteSpace: "nowrap", overflow: "visible", - // wordBreak: "break-word", }} > {authState.user?.role} @@ -248,9 +240,6 @@ const AuthFooter = ({ )} - {/* TODO Do we need two dividers? */} - {collapsed && } - {/* */} {renderAccountMenuItems(authState.user, accountMenuItems)} { const navigate = useNavigate(); const location = useLocation(); const { t } = useTranslation(); - const { width, transition } = useSidebar(); + const { width, transition, collapsed } = useSidebar(); const theme = useTheme(); const isSmall = useMediaQuery(theme.breakpoints.down("md")); const menu = getMenu(t); @@ -110,23 +111,11 @@ export const Sidebar = () => { })} - - {accountMenu.map((item) => { - const selected = location.pathname.startsWith(`/${item.path}`); - return ( - handleNavClick(item.path)} - /> - ); - })} - + + ); };