Fix: Donasi

Deskripsi:
- Fix router status donasi
- Fix hapus donasi
This commit is contained in:
2024-10-30 15:45:40 +08:00
parent 30743b02ae
commit a798f9a3bc
20 changed files with 328 additions and 235 deletions

View File

@@ -1,6 +1,4 @@
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
import { LayoutDonasi } from "@/app_modules/donasi";
import { Donasi_getNotifByUserId } from "@/app_modules/donasi/fun/get/get_notif_by_user_id";
import React from "react";
export default async function Layout({
@@ -8,17 +6,9 @@ export default async function Layout({
}: {
children: React.ReactNode;
}) {
const userLoginId = await funGetUserIdByToken();
const isRead = await Donasi_getNotifByUserId(userLoginId).then((res: any) =>
res.map((val: any) => val.isRead)
);
return (
<>
<LayoutDonasi userId={userLoginId} isRead={isRead as any}>
{children}
</LayoutDonasi>
<LayoutDonasi>{children}</LayoutDonasi>
</>
);
}