Fix: Donasi
Deskripsi: - Fix router status donasi - Fix hapus donasi
This commit is contained in:
@@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user