Refactored website components. New layout.

This commit is contained in:
Mike Cao 2025-05-20 01:12:07 -07:00
parent 6e41ba2e2c
commit 06f76dda13
35 changed files with 1159 additions and 987 deletions

View file

@ -1,11 +1,10 @@
'use client';
import { Grid, Loading, Column } from '@umami/react-zen';
import { Grid, Loading, Column, Row } from '@umami/react-zen';
import Script from 'next/script';
import { usePathname } from 'next/navigation';
import { UpdateNotice } from './UpdateNotice';
import { SideNav } from '@/app/(main)/SideNav';
import { MenuBar } from '@/app/(main)/MenuBar';
import { Page } from '@/components/common/Page';
import { useLoginQuery, useConfig } from '@/components/hooks';
export function App({ children }) {
@ -31,25 +30,26 @@ export function App({ children }) {
}
return (
<Grid height="100vh" width="100%" columns="auto 1fr" rows="auto 1fr">
<SideNav gridColumn="1 / 2" gridRow="1 / 3" />
<MenuBar gridColumn="2 / 3" gridRow="1 / 2" />
<Grid height="100vh" width="100%" columns="auto 1fr" rows="auto 1fr" backgroundColor="2">
<Column gridColumn="1 / 2" gridRow="1 / 3" backgroundColor>
<SideNav />
</Column>
<Row gridColumn="2 / 3" gridRow="1 / 2">
<MenuBar />
</Row>
<Column
gridColumn="2 / 3"
gridRow="2 / 3"
alignItems="center"
overflow="auto"
backgroundColor="2"
position="relative"
>
<Page>
{children}
{process.env.NODE_ENV === 'production' && !pathname.includes('/share/') && (
<Script src={`${process.env.basePath || ''}/telemetry.js`} />
)}
</Page>
{children}
</Column>
<UpdateNotice user={user} config={config} />
{process.env.NODE_ENV === 'production' && !pathname.includes('/share/') && (
<Script src={`${process.env.basePath || ''}/telemetry.js`} />
)}
</Grid>
);
}