feat(notifications): add dedicated page and localized rendering
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
type NotificationLevel,
|
||||
} from "../api/notifications"
|
||||
import { useTranslation } from "../hooks/useTranslation"
|
||||
import { presentNotification } from "../lib/notificationPresenter"
|
||||
import {
|
||||
getAccessToken,
|
||||
SESSION_CHANGED_EVENT,
|
||||
@@ -153,8 +154,9 @@ export function NotificationsProvider({ children }: { children: ReactNode }) {
|
||||
|
||||
toastedNotificationIdsRef.current.add(notification.id)
|
||||
const notify = getToastMethod(notification.level)
|
||||
notify(notification.title || (t.notifications?.newTitle || "New notification"), {
|
||||
description: notification.message || undefined,
|
||||
const presented = presentNotification(notification, t)
|
||||
notify(presented.title || (t.notifications?.newTitle || "New notification"), {
|
||||
description: presented.message || undefined,
|
||||
action: notification.action_url
|
||||
? {
|
||||
label: t.notifications?.openAction || "Open",
|
||||
|
||||
Reference in New Issue
Block a user