Merge pull request #424 from bipproduction/amalia/16-apr-25
fix: load refresh notifikasi list
This commit is contained in:
@@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET(request: Request) {
|
||||
try {
|
||||
return NextResponse.json({ success: true, version: "1.3.3", tahap: "beta", update: "- update baru : menampilkan notifikasi pengumuman setelah login (fixed tampilan); - rich text di pengumuman (tambah dan edit); - fitur tandai dibaca semua notifikasi" }, { status: 200 });
|
||||
return NextResponse.json({ success: true, version: "1.3.4", tahap: "beta", update: "- update baru : menampilkan notifikasi pengumuman setelah login (fixed tampilan); - rich text di pengumuman (tambah dan edit); - fitur tandai dibaca semua notifikasi" }, { status: 200 });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return NextResponse.json({ success: false, version: "Gagal mendapatkan version, coba lagi nanti (error: 500)", reason: (error as Error).message, }, { status: 500 });
|
||||
|
||||
@@ -49,7 +49,15 @@ export default function ListNotification() {
|
||||
|
||||
useShallowEffect(() => {
|
||||
fetchData(false);
|
||||
}, [isPage, reloadNotif.get()]);
|
||||
}, [isPage]);
|
||||
|
||||
useShallowEffect(() => {
|
||||
if (isPage != 1) {
|
||||
setPage(1)
|
||||
} else {
|
||||
fetchData(false)
|
||||
}
|
||||
}, [reloadNotif.get()]);
|
||||
|
||||
useEffect(() => {
|
||||
const handleScroll = async () => {
|
||||
|
||||
Reference in New Issue
Block a user