mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-07 22:31:35 -05:00
22 lines
619 B
TypeScript
22 lines
619 B
TypeScript
import LoadingSpinner from "@/components/shared/LoadingSpinner";
|
|
import { getServerSession } from "next-auth";
|
|
import { redirect } from "next/navigation";
|
|
import { authOptions } from "pages/api/auth/[...nextauth]";
|
|
import { HomeRedirect } from "./components";
|
|
import { PosthogClientWrapper } from "./PosthogClientWrapper";
|
|
|
|
export default async function Home() {
|
|
const session = await getServerSession(authOptions);
|
|
if (!session) {
|
|
redirect("/auth/login");
|
|
}
|
|
return (
|
|
<PosthogClientWrapper>
|
|
<div>
|
|
<HomeRedirect />
|
|
<LoadingSpinner />
|
|
</div>
|
|
</PosthogClientWrapper>
|
|
);
|
|
}
|