Replace the separate 240px WebsiteNav sidebar with website navigation integrated into the main SideNav. When a websiteId is active, SideNav shows a back arrow, WebsiteSelect dropdown, and grouped nav items instead of the main links. Extract shared useWebsiteNavItems hook used by both SideNav and WebsiteNav (still used by MobileNav). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
576 B
TypeScript
18 lines
576 B
TypeScript
'use client';
|
|
import { Column } from '@umami/react-zen';
|
|
import type { ReactNode } from 'react';
|
|
import { WebsiteProvider } from '@/app/(main)/websites/WebsiteProvider';
|
|
import { PageBody } from '@/components/common/PageBody';
|
|
import { WebsiteHeader } from './WebsiteHeader';
|
|
|
|
export function WebsiteLayout({ websiteId, children }: { websiteId: string; children: ReactNode }) {
|
|
return (
|
|
<WebsiteProvider websiteId={websiteId}>
|
|
<PageBody gap>
|
|
<WebsiteHeader showActions />
|
|
<Column>{children}</Column>
|
|
</PageBody>
|
|
</WebsiteProvider>
|
|
);
|
|
}
|