@replyke/core
Version:
Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.
22 lines (21 loc) • 930 B
TypeScript
import { NotificationTemplates, UnifiedAppNotification } from "../../interfaces/models/AppNotification";
export interface UseAppNotificationsProps {
limit?: number;
notificationTemplates?: Partial<NotificationTemplates>;
}
export interface UseAppNotificationsValues {
appNotifications: UnifiedAppNotification[];
unreadAppNotificationsCount: number;
loading: boolean;
hasMore: boolean;
loadMore: () => void;
markNotificationAsRead: (notificationId: string) => Promise<void>;
markAllNotificationsAsRead: () => Promise<void>;
resetAppNotifications: () => Promise<void>;
}
/**
* Redux-powered hook that provides the exact same interface as useAppNotificationsData()
* This is a drop-in replacement for the Context-based hook
*/
declare function useAppNotifications({ limit, notificationTemplates, }?: UseAppNotificationsProps): UseAppNotificationsValues;
export default useAppNotifications;