feat: tambah dependensi 'jose' versi 5.9.2 pada package.json
refactor: rapikan identasi dan buat field 'expires' opsional di model UserSession pada schema prisma chore: bersihkan import tidak terpakai di route login dan register API
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { LayoutDonasi } from "@/app_modules/donasi";
|
||||
import { Donasi_getNotifByUserId } from "@/app_modules/donasi/fun/get/get_notif_by_user_id";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
@@ -8,16 +9,16 @@ export default async function Layout({
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const userId = await user_funGetOneUserId();
|
||||
// console.log(userId)
|
||||
const isRead = await Donasi_getNotifByUserId(userId).then((res: any) =>
|
||||
res.map((val: any) => val.isRead)
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const isRead = await Donasi_getNotifByUserId(userLoginId).then((res: any) =>
|
||||
res.map((val: any) => val.isRead)
|
||||
);
|
||||
// console.log(isRead)
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutDonasi userId={userId} isRead={isRead as any}>
|
||||
<LayoutDonasi userId={userLoginId} isRead={isRead as any}>
|
||||
{children}
|
||||
</LayoutDonasi>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user