upd: notif pengumuman setelah login
Deskripsi: - mengupdate set cookies - mengupdate get cookies' No Issues
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user