fix: show notifications on mobile (#17008)

Show the notifications close to the menu button.

**After fix:**
<img width="515" alt="Screenshot 2025-03-19 at 15 09 36"
src="https://github.com/user-attachments/assets/38f86c5b-d324-4a8b-9c68-ea818b226ae4"
/>
This commit is contained in:
Bruno Quaresma
2025-03-19 15:19:57 -03:00
committed by GitHub
parent abbd88b819
commit ab763ca242
2 changed files with 26 additions and 25 deletions

View File

@ -67,9 +67,8 @@ export const MobileMenu: FC<MobileMenuProps> = ({
<DropdownMenuTrigger asChild> <DropdownMenuTrigger asChild>
<Button <Button
aria-label={open ? "Close menu" : "Open menu"} aria-label={open ? "Close menu" : "Open menu"}
size="lg" size="icon-lg"
variant="subtle" variant="subtle"
className="ml-auto md:hidden"
> >
{open ? <XIcon /> : <MenuIcon />} {open ? <XIcon /> : <MenuIcon />}
</Button> </Button>

View File

@ -67,6 +67,17 @@ export const NavbarView: FC<NavbarViewProps> = ({
canViewHealth={canViewHealth} canViewHealth={canViewHealth}
/> />
{user && (
<UserDropdown
user={user}
buildInfo={buildInfo}
supportLinks={supportLinks}
onSignOut={onSignOut}
/>
)}
</div>
<div className="ml-auto flex items-center gap-3 md:hidden">
<NotificationsInbox <NotificationsInbox
fetchNotifications={API.getInboxNotifications} fetchNotifications={API.getInboxNotifications}
markAllAsRead={() => { markAllAsRead={() => {
@ -79,16 +90,6 @@ export const NavbarView: FC<NavbarViewProps> = ({
} }
/> />
{user && (
<UserDropdown
user={user}
buildInfo={buildInfo}
supportLinks={supportLinks}
onSignOut={onSignOut}
/>
)}
</div>
<MobileMenu <MobileMenu
proxyContextValue={proxyContextValue} proxyContextValue={proxyContextValue}
user={user} user={user}
@ -100,6 +101,7 @@ export const NavbarView: FC<NavbarViewProps> = ({
canViewHealth={canViewHealth} canViewHealth={canViewHealth}
/> />
</div> </div>
</div>
); );
}; };