mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com> Co-authored-by: Johannes <johannes@formbricks.com> Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
30 lines
849 B
TypeScript
30 lines
849 B
TypeScript
import { FormbricksClient } from "@/app/(app)/components/FormbricksClient";
|
|
import { getServerSession } from "next-auth";
|
|
import { Suspense } from "react";
|
|
import { authOptions } from "@formbricks/lib/authOptions";
|
|
import { NoMobileOverlay } from "@formbricks/ui/NoMobileOverlay";
|
|
import { PHProvider, PostHogPageview } from "@formbricks/ui/PostHogClient";
|
|
import { ToasterClient } from "@formbricks/ui/ToasterClient";
|
|
|
|
const AppLayout = async ({ children }) => {
|
|
const session = await getServerSession(authOptions);
|
|
|
|
return (
|
|
<>
|
|
<NoMobileOverlay />
|
|
<Suspense>
|
|
<PostHogPageview />
|
|
</Suspense>
|
|
<PHProvider>
|
|
<>
|
|
{session ? <FormbricksClient session={session} /> : null}
|
|
<ToasterClient />
|
|
{children}
|
|
</>
|
|
</PHProvider>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default AppLayout;
|