Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #164 from statelyai/andarist/sta-320-events-panel-…
Browse files Browse the repository at this point in the history
…hiding-view-user-toolbar

Fix `zIndex` issue with events table and logged in user Menu
  • Loading branch information
Andarist committed Aug 10, 2021
2 parents 8e0810c + b16b5fa commit b1bb95f
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions src/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
ModalHeader,
ModalOverlay,
Text,
Portal,
} from '@chakra-ui/react';
import { useActor } from '@xstate/react';
import React from 'react';
Expand Down Expand Up @@ -55,25 +56,27 @@ export const Login: React.FC = () => {
width="30px"
/>
</MenuButton>
<MenuList>
{state.context.loggedInUserData && (
<Portal>
<MenuList>
{state.context.loggedInUserData && (
<MenuItem
as="a"
href={registryLinks.viewUserById(
state.context.loggedInUserData.id,
)}
>
View Machines
</MenuItem>
)}
<MenuItem
as="a"
href={registryLinks.viewUserById(
state.context.loggedInUserData.id,
)}
onClick={() => {
authService.send('SIGN_OUT');
}}
>
View Machines
Logout
</MenuItem>
)}
<MenuItem
onClick={() => {
authService.send('SIGN_OUT');
}}
>
Logout
</MenuItem>
</MenuList>
</MenuList>
</Portal>
</Menu>
)}

Expand Down

1 comment on commit b1bb95f

@vercel
Copy link

@vercel vercel bot commented on b1bb95f Aug 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.