diff --git a/apps/main/src/components/TopBar.tsx b/apps/main/src/components/TopBar.tsx index f224607..96c1f64 100644 --- a/apps/main/src/components/TopBar.tsx +++ b/apps/main/src/components/TopBar.tsx @@ -8,8 +8,15 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from "@xtablo/ui/components/dropdown-menu"; -import { Avatar, AvatarFallback, AvatarImage } from "@xtablo/ui/components/avatar"; -import { TypographyMuted, TypographySmall } from "@xtablo/ui/components/typography"; +import { + Avatar, + AvatarFallback, + AvatarImage, +} from "@xtablo/ui/components/avatar"; +import { + TypographyMuted, + TypographySmall, +} from "@xtablo/ui/components/typography"; import { BellIcon, CalendarCheckIcon, @@ -29,7 +36,10 @@ import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { Link, useLocation, useSearchParams } from "react-router-dom"; import { useLogout } from "../hooks/auth"; -import { useNotifications, useNotificationsSubscription } from "../hooks/notifications"; +import { + useNotifications, + useNotificationsSubscription, +} from "../hooks/notifications"; import { useUser } from "../providers/UserStoreProvider"; type Notification = Database["public"]["Tables"]["notifications"]["Row"]; @@ -156,7 +166,8 @@ function NotificationItem({ function NotificationDropdown() { const { t } = useTranslation("navigation"); - const { notifications, unreadCount, isLoading, markAsRead, markAllAsRead } = useNotifications(); + const { notifications, unreadCount, isLoading, markAsRead, markAllAsRead } = + useNotifications(); const { setupSubscription } = useNotificationsSubscription(); useEffect(() => { @@ -193,7 +204,9 @@ function NotificationDropdown() { {t("notifications.title", "Notifications")} {unreadCount > 0 && ( - {unreadCount} + + {unreadCount} + )} {unreadCount > 0 && ( @@ -232,7 +245,10 @@ function NotificationDropdown() {
{notifications.map((notification) => (
- +
))}
@@ -264,53 +280,58 @@ function ProfileDropdown() {
- + {user.name?.charAt(0).toUpperCase()}
- + {user.name} - {user.email} + + {user.email} +
- + - + {t("userMenu.settings")} - + {t("myEvents")} - + {t("userMenu.availabilities")} - + logout()} >