mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-26 10:42:16 -06:00
remove posthog client on survey frontend
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Logo } from "@/components/Logo";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { redirect } from "next/navigation";
|
||||
import { PosthogClientWrapper } from "../PosthogClientWrapper";
|
||||
|
||||
export default async function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
const session = await getServerSession();
|
||||
@@ -8,19 +9,21 @@ export default async function AuthLayout({ children }: { children: React.ReactNo
|
||||
redirect(`/`);
|
||||
}
|
||||
return (
|
||||
<div className="min-h-screen bg-slate-50">
|
||||
<div className="isolate bg-white">
|
||||
<div className="bg-gradient-radial flex min-h-screen from-slate-200 to-slate-50">
|
||||
<div className="mx-auto flex flex-1 flex-col justify-center px-4 py-12 sm:px-6 lg:flex-none lg:px-20 xl:px-24">
|
||||
<div className="mx-auto w-full max-w-sm rounded-xl bg-white p-8 shadow-xl lg:w-96">
|
||||
<div className="mb-8 text-center">
|
||||
<Logo className="mx-auto w-3/4" />
|
||||
<PosthogClientWrapper>
|
||||
<div className="min-h-screen bg-slate-50">
|
||||
<div className="isolate bg-white">
|
||||
<div className="bg-gradient-radial flex min-h-screen from-slate-200 to-slate-50">
|
||||
<div className="mx-auto flex flex-1 flex-col justify-center px-4 py-12 sm:px-6 lg:flex-none lg:px-20 xl:px-24">
|
||||
<div className="mx-auto w-full max-w-sm rounded-xl bg-white p-8 shadow-xl lg:w-96">
|
||||
<div className="mb-8 text-center">
|
||||
<Logo className="mx-auto w-3/4" />
|
||||
</div>
|
||||
{children}
|
||||
</div>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</PosthogClientWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
5
apps/web/app/billing-confirmation/layout.tsx
Normal file
5
apps/web/app/billing-confirmation/layout.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { PosthogClientWrapper } from "../PosthogClientWrapper";
|
||||
|
||||
export default async function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
return <PosthogClientWrapper>{children}</PosthogClientWrapper>;
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import { redirect } from "next/navigation";
|
||||
import { authOptions } from "pages/api/auth/[...nextauth]";
|
||||
import PosthogIdentify from "./PosthogIdentify";
|
||||
import FormbricksClient from "./FormbricksClient";
|
||||
import { PosthogClientWrapper } from "../../PosthogClientWrapper";
|
||||
|
||||
export default async function EnvironmentLayout({ children, params }) {
|
||||
const session = await getServerSession(authOptions);
|
||||
@@ -18,10 +19,12 @@ export default async function EnvironmentLayout({ children, params }) {
|
||||
<FormbricksClient session={session} />
|
||||
<ToasterClient />
|
||||
<EnvironmentsNavbar environmentId={params.environmentId} session={session} />
|
||||
<main className="h-full flex-1 overflow-y-auto bg-slate-50">
|
||||
{children}
|
||||
<main />
|
||||
</main>
|
||||
<PosthogClientWrapper>
|
||||
<main className="h-full flex-1 overflow-y-auto bg-slate-50">
|
||||
{children}
|
||||
<main />
|
||||
</main>
|
||||
</PosthogClientWrapper>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
5
apps/web/app/invite/layout.tsx
Normal file
5
apps/web/app/invite/layout.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { PosthogClientWrapper } from "../PosthogClientWrapper";
|
||||
|
||||
export default async function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
return <PosthogClientWrapper>{children}</PosthogClientWrapper>;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PosthogClientWrapper } from "@/app/PosthogClientWrapper";
|
||||
import "./globals.css";
|
||||
|
||||
export const metadata = {
|
||||
@@ -9,9 +8,7 @@ export const metadata = {
|
||||
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className="flex h-screen flex-col bg-slate-50">
|
||||
<PosthogClientWrapper>{children}</PosthogClientWrapper>
|
||||
</body>
|
||||
<body className="flex h-screen flex-col bg-slate-50">{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ 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);
|
||||
@@ -10,9 +11,11 @@ export default async function Home() {
|
||||
redirect("/auth/login");
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<HomeRedirect />
|
||||
<LoadingSpinner />
|
||||
</div>
|
||||
<PosthogClientWrapper>
|
||||
<div>
|
||||
<HomeRedirect />
|
||||
<LoadingSpinner />
|
||||
</div>
|
||||
</PosthogClientWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user