umami/components/pages/settings/SettingsLayout.js

24 lines
559 B
JavaScript
Raw Normal View History

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