mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-01 10:56:31 +08:00
maintain (eslint): linting on frontend
This commit is contained in:
@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user