nexus-react-core
Version:
A comprehensive React toolkit with services, hooks, and Redux store management
23 lines • 795 B
TypeScript
export interface Notification {
id: string;
type: string;
message: string;
isRead: boolean;
createdAt: string;
data?: any;
}
export interface NotificationRouterInterface {
push: (url: string) => void;
}
export declare const useNotifications: (router?: NotificationRouterInterface) => {
notifications: Notification[];
unreadCount: number;
fetchNotifications: () => Promise<void>;
markAsRead: (notificationId: string) => Promise<void>;
markAllAsRead: () => Promise<void>;
handleNotificationClick: (notification: Notification) => void;
clearNotification: (notificationId: string) => Promise<void>;
clearAllNotifications: () => Promise<void>;
refreshNotifications: () => Promise<void>;
};
//# sourceMappingURL=useNotifications.d.ts.map