Update Versi 1.5.27 #32
@@ -4,7 +4,8 @@ import { CheckCookies_UiLayout } from "@/app_modules/check_cookies";
|
||||
export default function Layout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<>
|
||||
<CheckCookies_UiLayout>{children}</CheckCookies_UiLayout>
|
||||
{children}
|
||||
{/* <CheckCookies_UiLayout>{children}</CheckCookies_UiLayout> */}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,15 +41,14 @@ export default async function RootLayout({
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
if (!token) return <>Require Token Storage</>;
|
||||
// if (!token) return <>Require Token Storage</>;
|
||||
// const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
return (
|
||||
<RootStyleRegistry>
|
||||
{/* <MqttLoader />
|
||||
<TokenProvider token={token} envObject={envObject} /> */}
|
||||
<RealtimeProvider userLoginId={userLoginId as string} />
|
||||
{/* <RealtimeProvider userLoginId={userLoginId as string} /> */}
|
||||
{children}
|
||||
</RootStyleRegistry>
|
||||
);
|
||||
|
||||
@@ -12,16 +12,10 @@ export function middleware(request: NextRequest) {
|
||||
_.isEmpty(cookies?.value) ||
|
||||
_.isUndefined(cookies?.value)
|
||||
) {
|
||||
return NextResponse.redirect(new URL("/", request.url));
|
||||
return NextResponse.redirect(new URL("/dev/auth/login", request.url));
|
||||
}
|
||||
|
||||
// return NextResponse.redirect(new URL("/", request.url));
|
||||
}
|
||||
|
||||
// See "Matching Paths" below to learn more
|
||||
export const config = {
|
||||
matcher: [
|
||||
|
||||
"/((?!_next|static|favicon.ico|manifest).*)",
|
||||
],
|
||||
matcher: ["/((?!_next|static|favicon.ico|manifest).*)"],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user