Skip to content

Commit d9d0d01

Browse files
committed
feat : 알림 받을시의 코드 오류 수정
1 parent 928952a commit d9d0d01

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/hooks/useServerSentEvents.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ export const useServerSentEvents = () => {
2828
const ALARM_TYPE: AlarmType[] = ['SENDING', 'LETTER', 'REPORT', 'SHARE', 'POSTED'];
2929
const handleOnMessage = async (data: string) => {
3030
const message: MessageEventData = await JSON.parse(data);
31-
if (ALARM_TYPE.includes(message.alarmType)) return;
32-
incrementNotReadCount();
33-
setToastActive({
34-
toastType: 'Info',
35-
title: message.title,
36-
position: 'Top',
37-
time: 5,
38-
onClick: () => navigate('/mypage/notifications'),
39-
});
31+
if (ALARM_TYPE.includes(message.alarmType)) {
32+
incrementNotReadCount();
33+
setToastActive({
34+
toastType: 'Info',
35+
title: message.title,
36+
position: 'Top',
37+
time: 5,
38+
onClick: () => navigate('/mypage/notifications'),
39+
});
40+
}
4041
};
4142

4243
// 토큰 재발급 함수

0 commit comments

Comments
 (0)