test server
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { AdminLayout } from "@/app_modules/admin/main_dashboard";
|
||||
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
@@ -6,9 +8,13 @@ export default async function Layout({
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const userId = await User_getUserId()
|
||||
const dataUser = await user_getOneById(userId)
|
||||
const userRole = dataUser?.masterUserRoleId
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminLayout>{children}</AdminLayout>
|
||||
<AdminLayout userRole={userRole as any}>{children}</AdminLayout>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user