umami/components/pages/settings/SettingsLayout.js

24 lines
548 B
JavaScript
Raw Normal View History

import Layout from 'components/layout/Layout';
import Menu from 'components/nav/Nav';
2023-01-05 06:20:24 +01:00
import useRequireLogin from 'hooks/useRequireLogin';
2023-01-10 08:59:26 +01:00
import styles from './SettingsLayout.module.css';
2020-09-06 02:27:01 +02:00
2023-01-10 08:59:26 +01:00
export default function SettingsLayout({ children }) {
2023-01-05 06:20:24 +01:00
const { user } = useRequireLogin();
if (!user) {
2022-02-27 00:53:45 +01:00
return null;
}
2020-08-05 07:45:05 +02:00
return (
<Layout>
<div className={styles.dashboard}>
<div className={styles.nav}>
<Menu />
</div>
<div className={styles.content}>{children}</div>
</div>
</Layout>
2020-08-05 07:45:05 +02:00
);
}