maintain (eslint): linting on frontend

This commit is contained in:
Mickael Kerjean
2021-12-21 01:32:37 +11:00
parent 48a6763380
commit 5156432b52
62 changed files with 1920 additions and 1655 deletions

View File

@ -1,8 +1,17 @@
import React, { Suspense } from "react";
import { BrowserRouter, Route, Switch } from "react-router-dom";
import { NotFoundPage, ConnectPage, HomePage, SharePage, LogoutPage, FilesPage, ViewerPage } from "./pages/";
import { URL_HOME, URL_FILES, URL_VIEWER, URL_LOGIN, URL_LOGOUT, URL_ADMIN, URL_SHARE } from "./helpers/";
import { ModalPrompt, ModalAlert, ModalConfirm, Notification, UploadQueue, LoadingPage } from "./components/";
import {
NotFoundPage, ConnectPage, HomePage, SharePage, LogoutPage,
FilesPage, ViewerPage,
} from "./pages/";
import {
URL_HOME, URL_FILES, URL_VIEWER, URL_LOGIN, URL_LOGOUT,
URL_ADMIN, URL_SHARE,
} from "./helpers/";
import {
ModalPrompt, ModalAlert, ModalConfirm, Notification, UploadQueue,
LoadingPage,
} from "./components/";
const LazyAdminPage = React.lazy(() => import(/* webpackChunkName: "admin" */"./pages/adminpage"));
@ -12,25 +21,23 @@ const AdminPage = () => (
</Suspense>
);
export default class AppRouter extends React.Component {
render() {
return (
<div style={{height: "100%"}}>
<BrowserRouter>
export default function AppRouter() {
return (
<div style={{ height: "100%" }}>
<BrowserRouter>
<Switch>
<Route exact path={URL_HOME} component={HomePage} />
<Route path={`${URL_SHARE}/:id*`} component={SharePage} />
<Route path={URL_LOGIN} component={ConnectPage} />
<Route path={`${URL_FILES}/:path*`} component={FilesPage} />
<Route path={`${URL_VIEWER}/:path*`} component={ViewerPage} />
<Route path={URL_LOGOUT} component={LogoutPage} />
<Route path={URL_ADMIN} component={AdminPage} />
<Route component={NotFoundPage} />
<Route exact path={URL_HOME} component={HomePage} />
<Route path={`${URL_SHARE}/:id*`} component={SharePage} />
<Route path={URL_LOGIN} component={ConnectPage} />
<Route path={`${URL_FILES}/:path*`} component={FilesPage} />
<Route path={`${URL_VIEWER}/:path*`} component={ViewerPage} />
<Route path={URL_LOGOUT} component={LogoutPage} />
<Route path={URL_ADMIN} component={AdminPage} />
<Route component={NotFoundPage} />
</Switch>
</BrowserRouter>
<ModalPrompt /> <ModalAlert /> <ModalConfirm />
<Notification /> <UploadQueue/>
</div>
);
}
</BrowserRouter>
<ModalPrompt /> <ModalAlert /> <ModalConfirm />
<Notification /> <UploadQueue/>
</div>
);
}