mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* refactor: remove attributes and segments entrypoints * fix: restore segment entrypoints * cleanup
27 lines
893 B
TypeScript
27 lines
893 B
TypeScript
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
|
|
import { buildLegacyRequest } from "@lib/buildLegacyCtx";
|
|
import { cookies, headers } from "next/headers";
|
|
import { redirect } from "next/navigation";
|
|
import type { SettingsLayoutProps } from "./SettingsLayoutAppDirClient";
|
|
import SettingsLayoutAppDirClient from "./SettingsLayoutAppDirClient";
|
|
|
|
export default async function SettingsLayoutAppDir(props: SettingsLayoutProps) {
|
|
const session = await getServerSession({ req: buildLegacyRequest(await headers(), await cookies()) });
|
|
const userId = session?.user?.id;
|
|
if (!userId) {
|
|
return redirect("/auth/login");
|
|
}
|
|
|
|
return (
|
|
<SettingsLayoutAppDirClient
|
|
{...props}
|
|
teamFeatures={{}}
|
|
permissions={{
|
|
canViewRoles: false,
|
|
canViewOrganizationBilling: false,
|
|
canUpdateOrganization: false,
|
|
}}
|
|
/>
|
|
);
|
|
}
|