From 52de95ea2f249bed94f4e8e11b0e59510ef42ae8 Mon Sep 17 00:00:00 2001 From: devbini Date: Fri, 6 Jun 2025 14:28:25 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=ED=8A=B9=EA=B0=95=20=EC=8B=A0?= =?UTF-8?q?=EC=B2=AD=20=EC=B7=A8=EC=86=8C=20=EC=95=8C=EB=A6=BC=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/notification.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/constants/notification.ts b/src/constants/notification.ts index 88abc500..d8e214f1 100644 --- a/src/constants/notification.ts +++ b/src/constants/notification.ts @@ -76,6 +76,11 @@ export const NOTIFICATION_TYPE: Record = { alertMessage: '캘린더 권한 부여가 필요한 매니저가 있습니다.', buttonText: '캘린더 권한 부여 이동', }, + 13: { + borderColor: '#FFB48C', + alertType: '특강 / 행사', + alertMessage: '가 취소되었습니다.', + }, }; // TODO '/' 로 표시된 부분은 이동 경로 확인 후, 수정 필요 From 5ca6393b7d69a8510a672ae2a136b05b3555242c Mon Sep 17 00:00:00 2001 From: devbini Date: Fri, 6 Jun 2025 14:57:33 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20=ED=8A=B9=EA=B0=95=20=EC=8A=B9?= =?UTF-8?q?=EC=9D=B8/=EB=B0=98=EB=A0=A4=20=EC=9D=B4=EB=8F=99=20URL=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 내 이벤트 목록으로 옮겨지도록 수정 완료 --- src/components/notification/CardContent.tsx | 9 +++++---- src/constants/notification.ts | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/notification/CardContent.tsx b/src/components/notification/CardContent.tsx index 6032ad99..8107dc22 100644 --- a/src/components/notification/CardContent.tsx +++ b/src/components/notification/CardContent.tsx @@ -14,7 +14,8 @@ interface CardContentProps { } export default function CardContent({ notification }: CardContentProps) { - const { id, content, isRead, createdAt, type, url, comment } = notification; + const { id, content, isRead, createdAt, type, url, comment, notiType } = + notification; const { deleteNotification, setNotificationAsRead } = useNotification(); const { alertType, alertMessage, buttonText } = NOTIFICATION_TYPE[type]; @@ -23,8 +24,8 @@ export default function CardContent({ notification }: CardContentProps) { deleteNotification(notification.id); }; - const getNotificationUrl = (notiType: number, urlId: string) => { - const routeUrl = NOTIFICATION_ROUTE[notiType]; + const getNotificationUrl = (inputNotiType: number, urlId: string) => { + const routeUrl = NOTIFICATION_ROUTE[inputNotiType]; return routeUrl?.replace('{id}', urlId); }; @@ -63,7 +64,7 @@ export default function CardContent({ notification }: CardContentProps) { {buttonText && ( {buttonText} diff --git a/src/constants/notification.ts b/src/constants/notification.ts index d8e214f1..de4ebfd6 100644 --- a/src/constants/notification.ts +++ b/src/constants/notification.ts @@ -95,4 +95,5 @@ export const NOTIFICATION_ROUTE: Record = { 10: '/', 11: '/', 12: '/', + 13: '/session-status', }; From 46de397f98d43f234781a035d5073b13f885a9a8 Mon Sep 17 00:00:00 2001 From: devbini Date: Fri, 6 Jun 2025 15:32:51 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20=EC=95=8C=EB=A6=BC=20=EB=B2=A8=20?= =?UTF-8?q?=EC=95=84=EC=9D=B4=EC=BD=98=20=EC=82=AD=EC=A0=9C=20=ED=83=80?= =?UTF-8?q?=EC=9D=B4=EB=B0=8D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 알림 바 생성 시 삭제되도록 수정 --- src/layouts/Header.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/layouts/Header.tsx b/src/layouts/Header.tsx index ab81d005..df6e1048 100644 --- a/src/layouts/Header.tsx +++ b/src/layouts/Header.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import { ReactNode, useState } from 'react'; import { useLocation } from 'react-router-dom'; @@ -43,12 +43,18 @@ export default function Header({ const { data: { profileImageUrl } = initialUserProfile } = useGetUserProfile(); const { data: notificationList } = useGetUnReadNotificationList(); + const [hasEverOpened, setHasEverOpened] = useState(false); const openNotificationListTab = () => { + setHasEverOpened(true); setIsNotificationServerSentEventData(false); setIsNotificationOpenOpen(prev => !prev); }; + const showRedDot = + isNotificationServerSentEvent || + (!hasEverOpened && notificationList?.length !== 0); + return (
@@ -71,8 +77,7 @@ export default function Header({ onClick={() => openNotificationListTab()} > - {(isNotificationServerSentEvent || - notificationList?.length !== 0) && ( + {showRedDot && (
)}