Fix: Notifikasi

Deskripsi:
- Fix tampilan & route norifkasi
- Pengambilan data diatur per notifikasi agar lebih cepat
This commit is contained in:
2024-11-13 12:04:45 +08:00
parent 1b58ba7d90
commit 82f5b237ae
30 changed files with 941 additions and 62 deletions

View File

@@ -59,13 +59,11 @@ export function ComponentHome_ButtonHeaderRight({
}) {
const router = useRouter();
const [isLoadingBell, setIsLoadingBell] = useState(false);
const [activeKategori, setActiveKategori] = useAtom(
gs_notifikasi_kategori_app
);
// Notifikasi
const [countNtf, setCountNtf] = useState(countNotifikasi);
const [newUserNtf, setNewUserNtf] = useAtom(gs_user_ntf);
const [categoryPage, setCategoryPage] = useAtom(gs_notifikasi_kategori_app);
useShallowEffect(() => {
// console.log(newUserNtf, "new notif");
@@ -113,9 +111,12 @@ export function ComponentHome_ButtonHeaderRight({
if (dataUser?.Profile === null) {
ComponentGlobal_NotifikasiPeringatan("Lengkapi Profile");
} else {
router.push(RouterNotifikasi.main, { scroll: false });
router.push(RouterNotifikasi.categoryApp({ name: "semua" }), {
scroll: false,
});
setCategoryPage("Semua");
setIsLoadingBell(true);
setActiveKategori("Semua");
// setActiveKategori("Semua");
}
}}
>