Page MenuHomec4science

App.js
No OneTemporary

File Metadata

Created
Sat, Nov 9, 15:05
import React from "react";
import "./App.css"
import SearchFilterFields from './pages/SearchFilterFields'
import Footer from './components/layout/Footer'
import About from "./pages/About"
import Help from "./pages/Help"
import Noresult from "./pages/Noresult"
import {Switch, Route } from "react-router-dom"
import Box from '@material-ui/core/Box'
import MenuAppBar from "./components/layout/MenuAppBar"
import { makeStyles } from '@material-ui/core/styles';
const useStyles = makeStyles((theme) => ({
root: {
flexGrow: 1,
},
}));
function App () {
const classes = useStyles();
return(
<div className={classes.root}>
<MenuAppBar />
<Switch>
<Route path="/about" exact component={About} />
<Route path="/help" exact component={Help} />
<Route path='/api' exact component={() => {
window.location.href = '/api/';
return null;
}}/>
<Route path='/docs/api' exact component={() => {
window.location.href = '/api/openapi';
return null;
}}/>
<Route path='/login' exact component={() => {
window.location.href = '/admin/';
return null;
}}/>
<Route path='/docs/frontend' exact component={() => {
window.location.href = '/styleguide/index.html';
return null;
}}/>
<Route path='/docs/backend' exact component={() => {
window.location.href = '/sphinx/index.html';
return null;
}}/>
<Route path="/" exact component= {SearchFilterFields}/>
<Route path="/check" exact component={SearchFilterFields} />
<Route exact component={Noresult} />
</Switch>
<Box style={{ marginTop: "8rem"}}>
<Footer />
</Box>
</div>
)
}
export default App

Event Timeline