更新依赖项;调整新的目录结构

This commit is contained in:
JIANG
2025-09-29 11:55:27 +08:00
parent 6d1cc6c9a1
commit fc84b255ea
19 changed files with 802 additions and 812 deletions

View File

@@ -0,0 +1,23 @@
import authOptions from "@app/api/auth/[...nextauth]/options";
import { Header } from "@components/header";
import { ThemedLayout } from "@refinedev/mui";
import { getServerSession } from "next-auth/next";
import { redirect } from "next/navigation";
import React from "react";
export default async function Layout({ children }: React.PropsWithChildren) {
const data = await getData();
if (!data.session?.user) {
return redirect("/login");
}
return <ThemedLayout Header={Header}>{children}</ThemedLayout>;
}
async function getData() {
const session = await getServerSession(authOptions);
return {
session,
};
}