* Some changes ported from the work on the makerkit.dev website related to the marketing sections of the kit, such as documentation * Added slight background hue to make darker theme better looking * Support more complex configurations for documentation navigations. * Do not fetch content from Keystatic when non-needed * Add cursor pointers in dropdown * Updated packages
28 lines
712 B
TypeScript
28 lines
712 B
TypeScript
import { getSupabaseServerClient } from '@kit/supabase/server-client';
|
|
|
|
import { SiteFooter } from '~/(marketing)/_components/site-footer';
|
|
import { SiteHeader } from '~/(marketing)/_components/site-header';
|
|
import { BackgroundHue } from '~/components/background-hue';
|
|
import { withI18n } from '~/lib/i18n/with-i18n';
|
|
|
|
async function SiteLayout(props: React.PropsWithChildren) {
|
|
const client = getSupabaseServerClient();
|
|
|
|
const {
|
|
data: { user },
|
|
} = await client.auth.getUser();
|
|
|
|
return (
|
|
<div className={'flex min-h-[100vh] flex-col'}>
|
|
<SiteHeader user={user} />
|
|
|
|
{props.children}
|
|
|
|
<BackgroundHue />
|
|
<SiteFooter />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default withI18n(SiteLayout);
|