-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e5f1db
commit ed7adf9
Showing
3 changed files
with
154 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { atom } from 'jotai'; | ||
import { EventSourcePolyfill } from 'event-source-polyfill'; | ||
import { NotificationResponse } from '../types/MyPage'; | ||
|
||
// Jotai atom 정의 | ||
export const sseConnectedAtom = atom(false); // SSE 연결 상태 | ||
export const sseMessagesAtom = atom<string[]>([]); // 수신된 알림 메시지 | ||
export const unreadCount = atom<number>(0); // 읽지 않은 알림 수 | ||
export const notifications = atom<string[]>([]); // 알림 목록 배열 | ||
export const notifications = atom<NotificationResponse>(); // 알림 목록 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters