2024-02-17 23:12:14 +00:00
|
|
|
import { Metadata } from 'next';
|
2023-11-12 04:45:09 +00:00
|
|
|
import App from './App';
|
2023-09-29 12:29:22 +00:00
|
|
|
import NavBar from './NavBar';
|
|
|
|
|
import Page from 'components/layout/Page';
|
|
|
|
|
import styles from './layout.module.css';
|
|
|
|
|
|
2023-11-12 04:45:09 +00:00
|
|
|
export default function ({ children }) {
|
2024-05-12 04:52:40 +00:00
|
|
|
if (process.env.DISABLE_UI) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-29 12:29:22 +00:00
|
|
|
return (
|
2023-11-12 04:45:09 +00:00
|
|
|
<App>
|
2023-09-29 12:29:22 +00:00
|
|
|
<main className={styles.layout}>
|
|
|
|
|
<nav className={styles.nav}>
|
|
|
|
|
<NavBar />
|
|
|
|
|
</nav>
|
|
|
|
|
<section className={styles.body}>
|
|
|
|
|
<Page>{children}</Page>
|
|
|
|
|
</section>
|
|
|
|
|
</main>
|
2023-11-12 04:45:09 +00:00
|
|
|
</App>
|
2023-09-29 12:29:22 +00:00
|
|
|
);
|
|
|
|
|
}
|
2024-02-17 23:12:14 +00:00
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
|
title: {
|
|
|
|
|
template: '%s | Umami',
|
|
|
|
|
default: 'Umami',
|
|
|
|
|
},
|
|
|
|
|
};
|