From 53064d420fdacaf4a746ef672709a214416e0403 Mon Sep 17 00:00:00 2001 From: devbini Date: Sat, 2 Aug 2025 00:35:07 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=EC=95=8C=EB=A6=BC=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20=ED=9E=88=ED=8A=B8=EB=B0=95=EC=8A=A4=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 이제 카드의 아무 부분이나 클릭해도 Read가 동작합니다. --- package-lock.json | 9 +++++---- .../notification/NotificationContent.tsx | 14 +++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 70df68c..439738a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3625,9 +3625,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001668", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001668.tgz", - "integrity": "sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==", + "version": "1.0.30001731", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001731.tgz", + "integrity": "sha512-lDdp2/wrOmTRWuoB5DpfNkC0rJDU8DqRa6nYL6HK6sytw70QMopt/NIc/9SM7ylItlBWfACXk0tEn37UWM/+mg==", "dev": true, "funding": [ { @@ -3642,7 +3642,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/chalk": { "version": "5.3.0", diff --git a/src/components/notification/NotificationContent.tsx b/src/components/notification/NotificationContent.tsx index 8a09679..08786d8 100644 --- a/src/components/notification/NotificationContent.tsx +++ b/src/components/notification/NotificationContent.tsx @@ -14,6 +14,7 @@ import CardContent from '@/components/notification/CardContent'; export default function NotificationContent() { const isNotificationOpen = useAtomValue(notificationOpenAtom); + const { setNotificationAsRead } = useNotification(); const { data: notificationList, refetch } = useGetNotificationList(); const { deleteAllNotification, setAllNotificationAsRead } = useNotification(); @@ -51,7 +52,18 @@ export default function NotificationContent() { key={item.id} className={`relative flex flex-col rounded-lg border border-mainGray bg-white pb-6 pl-[22px] pr-4 pt-8 ${ item.isRead && 'opacity-50' - }`} + } cursor-pointer`} + onClick={() => { + if (!item.isRead) setNotificationAsRead(item.id); + }} + tabIndex={0} + role="button" + onKeyDown={e => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + if (!item.isRead) setNotificationAsRead(item.id); + } + }} >
Date: Sun, 3 Aug 2025 23:00:17 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20comment=20=EB=82=B4=20rate=20?= =?UTF-8?q?=EB=B3=80=EC=88=98=20=EC=B6=94=EA=B0=80=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 일반 댓글의 경우 -1 고정 --- .../common/post-template/CommentTemplate.tsx | 7 ++++-- src/hooks/post/useHandleComment.ts | 24 +++++++++++++++---- src/services/comment/commentMutations.ts | 19 +++++++++++---- 3 files changed, 39 insertions(+), 11 deletions(-) diff --git a/src/components/common/post-template/CommentTemplate.tsx b/src/components/common/post-template/CommentTemplate.tsx index ba7bd1d..bd6fc18 100644 --- a/src/components/common/post-template/CommentTemplate.tsx +++ b/src/components/common/post-template/CommentTemplate.tsx @@ -42,7 +42,10 @@ export default function CommentTemplate({ postId }: CommentTemplateProps) { {commentList.length} -
+ onSubmit({ ...data, rate: -1 }))} + className="flex flex-col" + >