fix eslint and admin not loading
This commit is contained in:
parent
a3b59f24af
commit
ae88a01bea
|
@ -76,13 +76,9 @@ rules:
|
||||||
- 1
|
- 1
|
||||||
- "line-aligned"
|
- "line-aligned"
|
||||||
"react/jsx-closing-tag-location": 1
|
"react/jsx-closing-tag-location": 1
|
||||||
# This setup is required to avoid a spam of errors when running eslint about React being
|
"no-use-before-define": 0
|
||||||
# used before it is defined.
|
"@typescript-eslint/no-use-before-define": 1
|
||||||
#
|
"multiline-ternary": 0
|
||||||
# see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use
|
|
||||||
no-use-before-define: 0
|
|
||||||
"@typescript-eslint/no-use-before-define":
|
|
||||||
- warn
|
|
||||||
overrides:
|
overrides:
|
||||||
- files:
|
- files:
|
||||||
- "**/*.tsx"
|
- "**/*.tsx"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { lazy, useEffect, Suspense } from 'react';
|
import React, { useEffect, Suspense } from 'react';
|
||||||
import ReactGA from 'react-ga';
|
import ReactGA from 'react-ga';
|
||||||
import { hot } from 'react-hot-loader/root';
|
import { hot } from 'react-hot-loader/root';
|
||||||
import { Route, Router, Switch, useLocation } from 'react-router-dom';
|
import { Route, Router, Switch, useLocation } from 'react-router-dom';
|
||||||
|
@ -15,8 +15,9 @@ import GlobalStylesheet from '@/assets/css/GlobalStylesheet';
|
||||||
import { history } from '@/components/history';
|
import { history } from '@/components/history';
|
||||||
import { setupInterceptors } from '@/api/interceptors';
|
import { setupInterceptors } from '@/api/interceptors';
|
||||||
import TailwindGlobalStyles from '@/components/GlobalStyles';
|
import TailwindGlobalStyles from '@/components/GlobalStyles';
|
||||||
|
import AdminRouter from '@/routers/AdminRouter';
|
||||||
|
|
||||||
const ChunkedAdminRouter = lazy(() => import(/* webpackChunkName: "admin" */'@/routers/AdminRouter'));
|
// const ChunkedAdminRouter = lazy(() => import(/* webpackChunkName: "admin" */'@/routers/AdminRouter'));
|
||||||
|
|
||||||
interface ExtendedWindow extends Window {
|
interface ExtendedWindow extends Window {
|
||||||
SiteConfiguration?: SiteSettings;
|
SiteConfiguration?: SiteSettings;
|
||||||
|
@ -93,7 +94,7 @@ const App = () => {
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route path="/server/:id" component={ServerRouter}/>
|
<Route path="/server/:id" component={ServerRouter}/>
|
||||||
<Route path="/auth" component={AuthenticationRouter}/>
|
<Route path="/auth" component={AuthenticationRouter}/>
|
||||||
<Route path="/admin" component={ChunkedAdminRouter}/>
|
<Route path="/admin" component={AdminRouter}/>
|
||||||
<Route path="/" component={DashboardRouter}/>
|
<Route path="/" component={DashboardRouter}/>
|
||||||
<Route path={'*'} component={NotFound}/>
|
<Route path={'*'} component={NotFound}/>
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|
Loading…
Reference in New Issue