From 26c641114b7ba5ca0ef8dfd262d391f812947b9f Mon Sep 17 00:00:00 2001 From: Tim Pechersky Date: Thu, 21 Apr 2022 19:41:19 +0100 Subject: [PATCH] portals for account button menus --- frontend/src/components/AccountIconButton.js | 67 ++++++++++---------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/frontend/src/components/AccountIconButton.js b/frontend/src/components/AccountIconButton.js index 7cfe08f4..bfed04b4 100644 --- a/frontend/src/components/AccountIconButton.js +++ b/frontend/src/components/AccountIconButton.js @@ -9,6 +9,7 @@ import { MenuDivider, IconButton, chakra, + Portal, } from "@chakra-ui/react"; import { RiAccountCircleLine } from "react-icons/ri"; import useLogout from "../core/hooks/useLogout"; @@ -30,39 +31,41 @@ const AccountIconButton = (props) => { icon={} color="gray.100" /> - - - - Security - - - API tokens - - - - {ui.isMobileView && - ALL_NAV_PATHES.map((pathToLink, idx) => { - return ( - - - {pathToLink.title} - - - ); - })} - - { - logout(); - }} + + - Logout - - + + + Security + + + API tokens + + + + {ui.isMobileView && + ALL_NAV_PATHES.map((pathToLink, idx) => { + return ( + + + {pathToLink.title} + + + ); + })} + + { + logout(); + }} + > + Logout + + + ); };