Converted user and website settings.

This commit is contained in:
Mike Cao 2025-02-21 16:55:05 -08:00
parent 4c24e54fdd
commit b5c6194f36
59 changed files with 363 additions and 554 deletions

View file

@ -1,22 +1,18 @@
import { ReactNode } from 'react';
import { usePathname } from 'next/navigation';
import { SideNav } from '@/components/layout/SideNav';
import styles from './MenuLayout.module.css';
import { Grid, Column } from '@umami/react-zen';
import { MenuNav } from '@/components/layout/MenuNav';
export function MenuLayout({ items = [], children }: { items: any[]; children: ReactNode }) {
const pathname = usePathname();
const cloudMode = !!process.env.cloudMode;
const getKey = () => items.find(({ url }) => pathname === url)?.key;
return (
<div className={styles.layout}>
<Grid columns="auto 1fr" gap="5">
{!cloudMode && (
<div className={styles.menu}>
<SideNav items={items} shallow={true} selectedKey={getKey()} />
</div>
<Column width="240px">
<MenuNav items={items} shallow={true} />
</Column>
)}
<div className={styles.content}>{children}</div>
</div>
<Column>{children}</Column>
</Grid>
);
}