-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
35 lines (30 loc) · 862 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import React, { Fragment } from 'react';
import { Route } from 'react-router-dom';
import { SecureRoute, LoginCallback } from '@okta/okta-react';
import {
CssBaseline,
withStyles,
} from '@material-ui/core';
import AppHeader from './components/AppHeader';
import Home from './pages/Home';
import PostsManager from './pages/PostsManager';
const styles = theme => ({
main: {
padding: theme.spacing(3),
[theme.breakpoints.down('xs')]: {
padding: theme.spacing(2),
},
},
});
const App = ({ classes }) => (
<Fragment>
<CssBaseline />
<AppHeader />
<main className={classes.main}>
<Route exact path="/" component={Home} />
<SecureRoute path="/posts" component={PostsManager} />
<Route path="/login/callback" component={LoginCallback} />
</main>
</Fragment>
);
export default withStyles(styles)(App);