[common/components] chore: 알림 api 수정
This commit is contained in:
@@ -70,14 +70,14 @@ const getNoticeUserList = async (
|
||||
};
|
||||
|
||||
const getUnreadNoticeCount = async (recvUnqId: string) => {
|
||||
const response = await client.get<PageableList<NoticeUser>>(
|
||||
const response = await client.get<number>(
|
||||
`${ENDPOINT.CMS_SERVICE.NOTICE_USER}/${recvUnqId}/unread/count`,
|
||||
);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
const readNotice = async (notiId: number) => {
|
||||
const response = await client.post(
|
||||
const response = await client.put(
|
||||
`${ENDPOINT.CMS_SERVICE.NOTICE}/${notiId}/read`,
|
||||
);
|
||||
return response.data;
|
||||
|
||||
@@ -92,7 +92,7 @@ export function NoticePopover() {
|
||||
<Popover open={open} onOpenChange={setOpen}>
|
||||
<PopoverTrigger asChild>
|
||||
<div className="flex w-full items-center gap-2 text-left">
|
||||
알림 <Badge>{unreadNoticeCount?.totalElements ?? 0}</Badge>
|
||||
알림 <Badge>{unreadNoticeCount ?? 0}</Badge>
|
||||
</div>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-[32rem] border-border px-0">
|
||||
|
||||
Reference in New Issue
Block a user