frontend/src/screens/App.js

40 lines
826 B
JavaScript
Raw Normal View History

2020-05-11 16:39:04 +00:00
import React from 'react';
import 'rsuite/lib/styles/index.less';
import { Container } from 'rsuite';
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
2020-05-11 16:39:04 +00:00
2020-05-13 17:39:43 +00:00
import Dashboard from './Dashboard';
2020-05-11 16:39:04 +00:00
import Login from './Login';
2020-05-13 09:47:07 +00:00
import Register from './Register';
2020-05-13 13:39:31 +00:00
import NavBar from '../components/Navbar/NavBar';
2020-05-11 16:39:04 +00:00
const containerStyle = {
maxWidth: 700,
margin: '0 auto',
borderRadius: 7,
background: 'white',
2020-05-13 09:19:37 +00:00
marginTop: '10vh',
marginBottom: '10vh',
2020-05-11 16:39:04 +00:00
};
2020-05-13 13:39:31 +00:00
export default function App() {
2020-05-11 16:39:04 +00:00
return (
2020-05-13 13:39:31 +00:00
<Router>
<Container style={containerStyle}>
<NavBar />
<Switch>
2020-05-13 17:39:43 +00:00
<Route path='/' exact>
<Dashboard />
</Route>
2020-05-13 13:39:31 +00:00
<Route path='/login'>
<Login />
</Route>
<Route path='/register'>
<Register />
</Route>
</Switch>
</Container>
</Router>
2020-05-11 16:39:04 +00:00
);
}