mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 01:25:37 +01:00
add DISABLE_UI, DISABLE_ADMIN
This commit is contained in:
parent
736f06442c
commit
99c975c329
13 changed files with 94 additions and 20 deletions
14
pages/404.js
14
pages/404.js
|
|
@ -2,7 +2,11 @@ import React from 'react';
|
|||
import Layout from 'components/layout/Layout';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
export default function Custom404() {
|
||||
export default function Custom404({ pageDisabled }) {
|
||||
if (pageDisabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<div className="row justify-content-center">
|
||||
|
|
@ -13,3 +17,11 @@ export default function Custom404() {
|
|||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
pageDisabled: !!process.env.DISABLE_UI,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue