Skip to content

Commit

Permalink
fix(accountmenu): update nav bar display
Browse files Browse the repository at this point in the history
  • Loading branch information
martinwang2002 committed Jul 26, 2024
1 parent 0ed2e80 commit 59a0861
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/AccountManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const AccountMenu: FC = () => {
const [authState, setAuthState] = useAtom(authAtom)
const [logoutDialogOpen, setLogoutDialogOpen] = useState(false)
const [editDialogOpen, setEditDialogOpen] = useState(false)
const { isSM } = useCurrentSize()

const handleLogout = () => {
setAuthState({})
Expand Down Expand Up @@ -72,6 +73,14 @@ const AccountMenu: FC = () => {
/>
)}

{isSM && (
<MenuItem
shouldDismissPopover={false}
icon="user"
text={authState.username}
/>
)}

<MenuItem
shouldDismissPopover={false}
icon="edit"
Expand Down Expand Up @@ -161,7 +170,7 @@ export const AccountManager: ComponentType = withGlobalErrorBoundary(() => {
<Popover2 content={<AccountMenu />} position={Position.BOTTOM_RIGHT}>
<Button
icon="user"
text={authState.username}
text={!isSM && authState.username}
rightIcon="caret-down"
/>
</Popover2>
Expand Down

0 comments on commit 59a0861

Please sign in to comment.