Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78623526
App.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 22, 01:15
Size
1 KB
Mime Type
text/x-java
Expires
Sat, Aug 24, 01:15 (2 d)
Engine
blob
Format
Raw Data
Handle
20077503
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
App.js
View Options
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
Log In to Comment