mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-21 08:59:07 +01:00
Use API client for notifications/license
This commit is contained in:
@@ -10,7 +10,7 @@ export type ToastInstance = {
|
||||
id: string;
|
||||
uniqueKey: string;
|
||||
message: ReactNode;
|
||||
timeout: 3000 | 5000 | 8000 | null;
|
||||
timeout: 3000 | 5000 | 8000 | (number & {}) | null;
|
||||
onClose?: ToastProps['onClose'];
|
||||
} & Omit<ToastProps, 'onClose' | 'open' | 'children' | 'timeout'>;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ export function useNotificationToast() {
|
||||
id: string;
|
||||
timestamp: string;
|
||||
message: string;
|
||||
timeout?: number | null;
|
||||
action?: null | {
|
||||
url: string;
|
||||
label: string;
|
||||
@@ -23,7 +24,7 @@ export function useNotificationToast() {
|
||||
const actionLabel = payload.action?.label;
|
||||
showToast({
|
||||
id: payload.id,
|
||||
timeout: null,
|
||||
timeout: payload.timeout ?? undefined,
|
||||
message: payload.message,
|
||||
onClose: () => {
|
||||
markRead(payload.id)
|
||||
|
||||
Reference in New Issue
Block a user