From 504c2828844325d8e206e955ab60291e98f9c9fd Mon Sep 17 00:00:00 2001 From: talksik Date: Sat, 28 May 2022 19:58:09 -0500 Subject: [PATCH] footer bar nice separation of controls! --- packages/desktop/src/components/Navbar.tsx | 2 +- packages/desktop/src/components/Terminal.tsx | 145 ++++++++++++++++++- 2 files changed, 142 insertions(+), 5 deletions(-) diff --git a/packages/desktop/src/components/Navbar.tsx b/packages/desktop/src/components/Navbar.tsx index 77c2d72..b332c31 100644 --- a/packages/desktop/src/components/Navbar.tsx +++ b/packages/desktop/src/components/Navbar.tsx @@ -71,7 +71,7 @@ const Navbar = () => { ({ // todo: extract each use effect to custom hook and will be clean export function TerminalProvider({ children }: { children?: React.ReactNode }) { const { enqueueSnackbar } = useSnackbar(); - const { user } = useAuth(); + const { user, logout } = useAuth(); const [selectedConversationId, setSelectedConversationId] = useState(undefined); @@ -260,6 +268,15 @@ export function TerminalProvider({ children }: { children?: React.ReactNode }) { [setSelectedConversationId], ); + const [anchorEl, setAnchorEl] = React.useState(null); + const open = Boolean(anchorEl); + const handleClick = (event: React.MouseEvent) => { + setAnchorEl(event.currentTarget); + }; + const handleClose = () => { + setAnchorEl(null); + }; + return ( - + {/* navbar */} + + - + + + Profile + + + My account + + + + + + + + + Logout + + + {searchVal ? ( ) : ( @@ -337,6 +418,62 @@ export function TerminalProvider({ children }: { children?: React.ReactNode }) { /> )} + + {/* footer controls */} + + + + + + + + + + + + + + + + + + + + + + +