Initial commit

This commit is contained in:
John Lyon-Smith
2018-02-22 17:57:27 -08:00
commit e80f5490d5
196 changed files with 38982 additions and 0 deletions

35
website/src/App.js Normal file
View File

@@ -0,0 +1,35 @@
import React from 'react'
import './App.scss'
import { NavBar } from './Navigation'
import { Home } from './Home'
import { Login, Logout, ResetPassword, ForgotPassword, ConfirmEmail, ProtectedRoute } from './Auth'
import { Dashboard } from './Dashboard'
import { Profile } from './Profile'
import { Users } from './Users'
import { Footer } from './Footer'
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
export class App extends React.Component {
render() {
return (
<Router basename='/'>
<div className='App'>
<NavBar />
<Switch>
<Route exact path='/' component={Home} />
<Route path='/login' component={Login} />
<Route path='/confirm-email' component={ConfirmEmail} />
<Route path='/reset-password' component={ResetPassword} />
<Route path='/forgot-password' component={ForgotPassword} />
<ProtectedRoute path='/logout' component={Logout} />
<ProtectedRoute path='/profile' component={Profile} />
<ProtectedRoute roles={['administrator', 'normal']} path='/dashboard' component={Dashboard} />
<ProtectedRoute roles={['administrator']} path='/users' component={Users} />
<Route component={Home} />{/* No Match Route */}
</Switch>
<Footer />
</div>
</Router>
)
}
}