diff --git a/app/[locale]/(public)/inbox/update/page.tsx b/app/[locale]/(public)/inbox/update/page.tsx index 1ce6f763..b8b14476 100644 --- a/app/[locale]/(public)/inbox/update/page.tsx +++ b/app/[locale]/(public)/inbox/update/page.tsx @@ -35,7 +35,7 @@ const UpdateSection = () => { setNotifications(response?.data?.data?.content); setGetTotalData(response?.data?.data?.totalElements); setGetTotalPage(response?.data?.data?.totalPage); - } + } if (isUpdate) { getNotifUpdate(); diff --git a/components/landing-page/navbar.tsx b/components/landing-page/navbar.tsx index 20e7bffc..ffa461eb 100644 --- a/components/landing-page/navbar.tsx +++ b/components/landing-page/navbar.tsx @@ -96,12 +96,23 @@ const Navbar = () => { setNotifications(response?.data?.data?.content); console.log("respon:", response); } + if (roleId != undefined) { + const response = await getUserNotifications(0, 3); + setNotifications(response?.data?.data?.content); + console.log("respon:", response); + } } async function getNotifUpdate() { + if (roleId != undefined) { + const response = await getUserNotifications(0, 2); + setNotificationsUpdate(response?.data?.data?.content); + console.log("Notiffff:", response); + } if (roleId != undefined) { const response = await getUserNotifications(0, 3); - setNotificationsUpdate(response?.data?.data?.content); // console.log("respon:", response); + setNotificationsUpdate(response?.data?.data?.content); + console.log("Notiffff:", response); } } @@ -379,7 +390,7 @@ const Navbar = () => { - + @@ -411,11 +422,11 @@ const Navbar = () => { - + {notifications?.map((list: any) => ( - + - + {list?.message} @@ -430,7 +441,7 @@ const Navbar = () => { ))} - + Lihat semua
+
Lihat semua