mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Refactor env check.
This commit is contained in:
parent
ba63991a92
commit
fc9584eb44
14 changed files with 30 additions and 76 deletions
|
|
@ -2,6 +2,7 @@ import Head from 'next/head';
|
|||
import { useRouter } from 'next/router';
|
||||
import { IntlProvider } from 'react-intl';
|
||||
import useLocale from 'hooks/useLocale';
|
||||
import useConfig from 'hooks/useConfig';
|
||||
import 'styles/variables.css';
|
||||
import 'styles/bootstrap-grid.css';
|
||||
import 'styles/index.css';
|
||||
|
|
@ -23,6 +24,11 @@ const Intl = ({ children }) => {
|
|||
export default function App({ Component, pageProps }) {
|
||||
const { basePath } = useRouter();
|
||||
const { dir } = useLocale();
|
||||
const { uiDisabled } = useConfig();
|
||||
|
||||
if (uiDisabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Intl>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue