From 521c6988a52765ce789aac2de5eff3fb62179f4a Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 1 Aug 2025 15:58:01 -0700 Subject: [PATCH] add onclick to avatar --- client/src/Components/Avatar/index.jsx | 4 +++- client/src/Components/Sidebar/components/authFooter.jsx | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/src/Components/Avatar/index.jsx b/client/src/Components/Avatar/index.jsx index aa2050827..d089080ff 100644 --- a/client/src/Components/Avatar/index.jsx +++ b/client/src/Components/Avatar/index.jsx @@ -15,7 +15,7 @@ import { useTheme } from "@emotion/react"; * */ -const Avatar = ({ src, small, sx }) => { +const Avatar = ({ src, small, sx, onClick = () => {} }) => { const { user } = useSelector((state) => state.auth); const theme = useTheme(); @@ -31,6 +31,7 @@ const Avatar = ({ src, small, sx }) => { return ( { borderRadius={theme.shape.borderRadius} boxSizing={"border-box"} > - + collapsed && openPopup(e)} + sx={{ + cursor: collapsed ? "pointer" : "default", + }} + />