mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
Refactor env check.
This commit is contained in:
parent
ba63991a92
commit
fc9584eb44
14 changed files with 30 additions and 76 deletions
|
|
@ -3,10 +3,10 @@ import Layout from 'components/layout/Layout';
|
|||
import RealtimeDashboard from 'components/pages/RealtimeDashboard';
|
||||
import useRequireLogin from 'hooks/useRequireLogin';
|
||||
|
||||
export default function RealtimePage({ pageDisabled }) {
|
||||
export default function RealtimePage() {
|
||||
const { loading } = useRequireLogin();
|
||||
|
||||
if (pageDisabled || loading) {
|
||||
if (loading) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -16,11 +16,3 @@ export default function RealtimePage({ pageDisabled }) {
|
|||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
pageDisabled: !!process.env.DISABLE_UI,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue