Fix prisma
Deskripsi: - Cek pemanggilan prisma di develop mode
This commit is contained in:
@@ -1,42 +1,24 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { funGlobal_getUserById } from "@/app_modules/_global/fun/get/fun_get_user_by_id";
|
||||
import { redirect } from "next/navigation";
|
||||
import { RealtimeProvider } from "../lib";
|
||||
import { newFunGetUserId } from "../lib/new_fun_user_id";
|
||||
import { ServerEnv } from "../lib/server_env";
|
||||
import { RouterAdminDashboard } from "../lib/router_hipmi/router_admin";
|
||||
import { funGlobal_checkActivationUseById } from "@/app_modules/_global/fun/get/fun_check_activation_use_by_id";
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
// const userLoginId = await funGetUserIdByToken();
|
||||
// const dataUser = await funGlobal_getUserById({
|
||||
// userId: userLoginId as string,
|
||||
// });
|
||||
|
||||
// if (dataUser?.masterUserRoleId != "1") return redirect("/dev/home");
|
||||
|
||||
// const activationUser = await funGlobal_checkActivationUseById({
|
||||
// userId: userLoginId as string,
|
||||
// });
|
||||
|
||||
// if (activationUser == false) return redirect("/waiting-room");
|
||||
const userLoginId = await newFunGetUserId();
|
||||
|
||||
return (
|
||||
<>
|
||||
<RealtimeProvider
|
||||
userLoginId={"" as string}
|
||||
userLoginId={userLoginId as string}
|
||||
WIBU_REALTIME_TOKEN={
|
||||
ServerEnv.value?.NEXT_PUBLIC_WIBU_REALTIME_TOKEN as string
|
||||
}
|
||||
/>
|
||||
|
||||
{children}
|
||||
{/* <CheckCookies_UiLayout dataUser={dataUser as any}>
|
||||
{children}
|
||||
</CheckCookies_UiLayout> */}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user