Updated website edit.

This commit is contained in:
Mike Cao 2025-10-03 23:05:15 -07:00
parent fdfa8b08f9
commit eabfec9075
8 changed files with 47 additions and 58 deletions

View file

@ -2,17 +2,24 @@
import { ReactNode } from 'react';
import { Column, Grid } from '@umami/react-zen';
import { WebsiteProvider } from '@/app/(main)/websites/WebsiteProvider';
import { useNavigation } from '@/components/hooks';
import { PageBody } from '@/components/common/PageBody';
import { WebsiteHeader } from './WebsiteHeader';
import { WebsiteNav } from './WebsiteNav';
export function WebsiteLayout({ websiteId, children }: { websiteId: string; children: ReactNode }) {
const { pathname } = useNavigation();
const isSettings = pathname.endsWith('/settings');
return (
<WebsiteProvider websiteId={websiteId}>
<Grid columns="auto 1fr" width="100%" height="100%">
<Column height="100%" border="right" backgroundColor marginRight="2">
<WebsiteNav websiteId={websiteId} />
</Column>
<Grid columns={isSettings ? '1fr' : 'auto 1fr'} width="100%" height="100%">
{!isSettings && (
<Column height="100%" border="right" backgroundColor marginRight="2">
<WebsiteNav websiteId={websiteId} />
</Column>
)}
<PageBody gap>
<WebsiteHeader />
<Column>{children}</Column>