Responsive updates.

This commit is contained in:
Mike Cao 2025-10-09 17:14:09 -07:00
parent e4ce7c9071
commit 8aa4192576
14 changed files with 976 additions and 917 deletions

View file

@ -2,24 +2,23 @@
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={isSettings ? '1fr' : 'auto 1fr'} width="100%" height="100%">
{!isSettings && (
<Column height="100%" border="right" backgroundColor marginRight="2">
<WebsiteNav websiteId={websiteId} />
</Column>
)}
<Grid columns={{ xs: '1fr', lg: 'auto 1fr' }} width="100%" height="100%">
<Column
display={{ xs: 'none', lg: 'flex' }}
height="100%"
border="right"
backgroundColor
marginRight="2"
>
<WebsiteNav websiteId={websiteId} />
</Column>
<PageBody gap>
<WebsiteHeader showActions />
<Column>{children}</Column>