2022-12-27 01:57:59 +01:00
|
|
|
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();
|
2020-08-07 08:02:24 +02:00
|
|
|
|
2022-12-29 00:43:22 +01:00
|
|
|
if (!user) {
|
2022-02-27 00:53:45 +01:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2020-08-05 07:45:05 +02:00
|
|
|
return (
|
2022-12-27 01:57:59 +01:00
|
|
|
<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
|
|
|
);
|
|
|
|
}
|