mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
22 lines
677 B
TypeScript
22 lines
677 B
TypeScript
import { setUser as SentrySetUser } from "@sentry/nextjs";
|
|
import { cookies, headers } from "next/headers";
|
|
import React from "react";
|
|
|
|
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
|
|
import Shell from "@calcom/features/shell/Shell";
|
|
|
|
import { buildLegacyRequest } from "@lib/buildLegacyCtx";
|
|
|
|
const Layout = async ({ children }: { children: React.ReactNode }) => {
|
|
const session = await getServerSession({ req: buildLegacyRequest(await headers(), await cookies()) });
|
|
if (session?.user?.id) SentrySetUser({ id: session.user.id });
|
|
|
|
return (
|
|
<>
|
|
<Shell withoutMain={true}>{children}</Shell>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default Layout;
|