Added SSE function and add readAt for notification
This commit is contained in:
14
src/store/useNotificationStore.ts
Normal file
14
src/store/useNotificationStore.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { create } from 'zustand';
|
||||
|
||||
type NotifyState = {
|
||||
hasNew: boolean;
|
||||
setHasNew: (hasNew: boolean) => void;
|
||||
};
|
||||
|
||||
const useNotificationStore = create<NotifyState>((set) => ({
|
||||
hasNew: false,
|
||||
setHasNew: (hasNew: boolean) => set({ hasNew }),
|
||||
toggleNew: () => set((state) => ({ hasNew: !state.hasNew })),
|
||||
}));
|
||||
|
||||
export default useNotificationStore;
|
||||
Reference in New Issue
Block a user