mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 23:56:39 +08:00
31 lines
687 B
TypeScript
31 lines
687 B
TypeScript
import { Analytics } from "@vercel/analytics/react";
|
|
|
|
import { Home } from "./components/home";
|
|
|
|
import { getServerSideConfig } from "./config/server";
|
|
|
|
// import { getSession } from "@/lib/auth";
|
|
// import { isName } from "@/lib/auth_list";
|
|
// import { redirect } from "next/navigation";
|
|
|
|
const serverConfig = getServerSideConfig();
|
|
|
|
export default async function App() {
|
|
// const session = await getSession();
|
|
// const name = session?.user?.email || session?.user?.name;
|
|
// if (!(name && isName(name))) {
|
|
// redirect("/login");
|
|
// }
|
|
|
|
return (
|
|
<>
|
|
<Home />
|
|
{serverConfig?.isVercel && (
|
|
<>
|
|
<Analytics />
|
|
</>
|
|
)}
|
|
</>
|
|
);
|
|
}
|