Files
MERN-template/client/components/app.jsx
T
Ratstail91 7c09ac46da Stripped out a whole bunch of pages, read more
The purpose of this branch is to bring this project in line with the JWT
protcol that the microservice is using. For the time being, it's easier
to get a stripped-down and stable build and replace the lost parts, one-
by-one.
2021-03-08 12:34:41 +11:00

35 lines
936 B
React

//react
import React from 'react';
import { BrowserRouter, Switch } from 'react-router-dom';
//library components
import LazyRoute from './lazy-route';
import Markdown from './panels/markdown';
//styling
//TODO: styling import
//common components
import Header from './panels/header.jsx';
import Footer from './panels/footer.jsx';
const App = props => {
//default render
return (
<BrowserRouter>
<Header />
<Switch>
<LazyRoute exact path='/' component={() => import('./pages/homepage')} />
<LazyRoute path='/privacypolicy' component={async () => () => <Markdown content={require('../markdown/privacy-policy.md').default} />} />
<LazyRoute path='/credits' component={async () => () => <Markdown content={require('../markdown/credits.md').default} />} />
<LazyRoute path='*' component={() => import('./pages/not-found')} />
</Switch>
<Footer />
</BrowserRouter>
);
};
export default App;