Skip to content

Commit 59a0861

Browse files
fix(accountmenu): update nav bar display
1 parent 0ed2e80 commit 59a0861

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/components/AccountManager.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const AccountMenu: FC = () => {
3333
const [authState, setAuthState] = useAtom(authAtom)
3434
const [logoutDialogOpen, setLogoutDialogOpen] = useState(false)
3535
const [editDialogOpen, setEditDialogOpen] = useState(false)
36+
const { isSM } = useCurrentSize()
3637

3738
const handleLogout = () => {
3839
setAuthState({})
@@ -72,6 +73,14 @@ const AccountMenu: FC = () => {
7273
/>
7374
)}
7475

76+
{isSM && (
77+
<MenuItem
78+
shouldDismissPopover={false}
79+
icon="user"
80+
text={authState.username}
81+
/>
82+
)}
83+
7584
<MenuItem
7685
shouldDismissPopover={false}
7786
icon="edit"
@@ -161,7 +170,7 @@ export const AccountManager: ComponentType = withGlobalErrorBoundary(() => {
161170
<Popover2 content={<AccountMenu />} position={Position.BOTTOM_RIGHT}>
162171
<Button
163172
icon="user"
164-
text={authState.username}
173+
text={!isSM && authState.username}
165174
rightIcon="caret-down"
166175
/>
167176
</Popover2>

0 commit comments

Comments
 (0)