add posthog to onboarding

This commit is contained in:
Matthias Nannt
2023-05-03 22:25:59 +02:00
parent 035652556d
commit bac12eb552
2 changed files with 20 additions and 1 deletions
@@ -15,7 +15,7 @@ export default async function EnvironmentLayout({ children, params }) {
return (
<>
{<PosthogIdentify session={session} />}
<PosthogIdentify session={session} />
<FormbricksClient session={session} />
<ToasterClient />
<EnvironmentsNavbar environmentId={params.environmentId} session={session} />
+19
View File
@@ -0,0 +1,19 @@
import { authOptions } from "@/app/api/auth/[...nextauth]/authOptions";
import { getServerSession } from "next-auth";
import { redirect } from "next/navigation";
import PosthogIdentify from "../environments/[environmentId]/PosthogIdentify";
import { PosthogClientWrapper } from "../PosthogClientWrapper";
export default async function EnvironmentLayout({ children }) {
const session = await getServerSession(authOptions);
if (!session) {
return redirect(`/auth/login`);
}
return (
<>
<PosthogIdentify session={session} />
<PosthogClientWrapper>{children}</PosthogClientWrapper>
</>
);
}