diff --git a/src/app/[spaceId]/[[...pathname]]/ClientContexts.tsx b/src/app/[spaceId]/ClientContexts.tsx similarity index 100% rename from src/app/[spaceId]/[[...pathname]]/ClientContexts.tsx rename to src/app/[spaceId]/ClientContexts.tsx diff --git a/src/app/[spaceId]/[[...pathname]]/layout.tsx b/src/app/[spaceId]/[[...pathname]]/layout.tsx deleted file mode 100644 index 3f79a2f69..000000000 --- a/src/app/[spaceId]/[[...pathname]]/layout.tsx +++ /dev/null @@ -1,172 +0,0 @@ -import { CustomizationHeaderPreset, CustomizationSettings } from '@gitbook/api'; -import assertNever from 'assert-never'; -import Script from 'next/script'; -import colors from 'tailwindcss/colors'; - -import { fonts, ibmPlexMono } from '@/fonts'; -import { getSpaceLanguage } from '@/intl/server'; -import { getSpaceContent } from '@/lib/api'; -import { hexToRgb, shadesOfColor } from '@/lib/colors'; -import { getContentSecurityPolicyNonce } from '@/lib/csp'; -import { tcls } from '@/lib/tailwind'; - -import { ClientContexts } from './ClientContexts'; -import { PagePathParams } from '../fetch'; - -export default async function SpaceRootLayout(props: { - children: React.ReactNode; - params: PagePathParams; -}) { - const { params, children } = props; - - const { customization, scripts } = await getSpaceContent({ - spaceId: params.spaceId, - }); - const headerTheme = generateHeaderTheme(customization); - const nonce = getContentSecurityPolicyNonce(); - const language = getSpaceLanguage(customization); - - return ( - - - {customization.privacyPolicy.url ? ( - - ) : null} - - - - {children} - - {scripts.map(({ script }) => ( -