test server

This commit is contained in:
2024-04-03 17:30:04 +08:00
parent f6649fe93e
commit 00336802b2
12 changed files with 199 additions and 34 deletions

View File

@@ -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>
</>
);
}