Skip to content

Commit

Permalink
Merge pull request #247 from Team-TenTen/feature/#246/bug-notificatio…
Browse files Browse the repository at this point in the history
…n-count

알림 삭제 기능 수정
  • Loading branch information
dudwns authored Dec 3, 2023
2 parents 5a96cc6 + 48a44a9 commit fcd694a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/(routes)/notification/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client'

import { NONE_NOTIFICATION_RESULT } from '@/components/common/NotificationList/constants'
import { SEACH_MODAL_INFO } from '@/components/common/SearchModal/constants'

const NotificationPage = () => {
return (
Expand All @@ -19,7 +20,7 @@ const NotificationPage = () => {
/>
))} */}
<div className="py-5 text-center text-sm font-medium text-gray9">
{NONE_NOTIFICATION_RESULT}
{SEACH_MODAL_INFO}
</div>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const NotificationList = ({ fetchFn, type }: NotificationListProps) => {
</Fragment>
))
) : (
<div className="flex justify-center text-base font-semibold text-gray9">
<div className="py-5 text-center text-sm font-medium text-gray9">
{NONE_NOTIFICATION_RESULT}
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const useAcceptNotification = ({ type }: UseAcceptNotificationProps) => {
notify('success', NOTIFICATION_INVITE.SUCCESS)
router.push(`/space/${spaceId}`)
await queryclient.invalidateQueries({ queryKey: ['notification', type] })
await queryclient.invalidateQueries({
queryKey: ['notificationCount'],
})
} catch (e) {
console.error(e)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const useDeleteNotification = ({ type }: UseDeleteNotificationProps) => {
}: FetchDeleteNotificationProps) => {
await fetchDeleteNotification({ notificationId })
await queryclient.invalidateQueries({ queryKey: ['notification', type] })
await queryclient.invalidateQueries({ queryKey: ['notificationCount'] })
}

return { handleDeleteNotification }
Expand Down

0 comments on commit fcd694a

Please sign in to comment.