mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-21 11:30:27 -05:00
add posthog to onboarding
This commit is contained in:
@@ -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} />
|
||||
|
||||
@@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user