[ ADD ] react configuration

This commit is contained in:
Kuroi488
2020-11-16 17:14:34 +01:00
parent 89c9cfe099
commit 5078a1a96e
71 changed files with 16891 additions and 0 deletions

View File

@ -0,0 +1,2 @@
import { createBrowserHistory } from "history";
export default createBrowserHistory();

View File

@ -0,0 +1,22 @@
import React, { Suspense } from "react";
import { Router, Switch } from "react-router-dom";
import history from "./History";
import * as LazyComponent from "../utils/LazyLoaded";
import Loader from "../components/Loader/Loader";
import PrivateRoute from "../utils/PrivateRoute";
const Routes = (
<Suspense fallback={<Loader />}>
<Router history={history}>
<Switch>
{/* For private routes */}
<PrivateRoute component={LazyComponent.Home} path="/" exact />
{/* Public routes that doesn't need any auth */}
<LazyComponent.Login path="/login" exact />
<LazyComponent.NotFound path="**" title="This page doesn't exist..." exact />
</Switch>
</Router>
</Suspense>
);
export default Routes;