upd: notif pengumuman setelah login

Deskripsi:
- mengupdate set cookies
- mengupdate get cookies'

No Issues
This commit is contained in:
amel
2025-04-08 15:04:28 +08:00
parent bba7ddaff3
commit 75b75ea5e8
5 changed files with 42 additions and 32 deletions

View File

@@ -15,15 +15,12 @@ export default function NotificationAnnouncement() {
async function fetchData() {
try {
const res = await funGetOneNotificationAnnouncement();
if (res.success) {
if (res.show) {
setTampilNotif(true)
setData(res.data);
} else {
toast.error(res.message);
setData(res.data)
}
} catch (error) {
console.error(error);
toast.error("Gagal memuat data, coba lagi nanti");
} finally {
setTimeout(() => {
setTampilNotif(false);