33 lines
1.1 KiB
JavaScript
33 lines
1.1 KiB
JavaScript
|
import React from 'react';
|
||
|
import 'rsuite/lib/styles/index.less';
|
||
|
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
|
||
|
|
||
|
import PrivateRoute from './components/routes/PrivateRoute';
|
||
|
import PublicRoute from './components/routes/PublicRoute';
|
||
|
|
||
|
import Dashboard from './screens/Dashboard';
|
||
|
import Schedule from './screens/Schedule/Schedule';
|
||
|
import Availability from './screens/Availability/Availability';
|
||
|
import Invite from './screens/Invite/Invite';
|
||
|
import Login from './screens/Login';
|
||
|
import Register from './screens/Register';
|
||
|
|
||
|
export default function App() {
|
||
|
return (
|
||
|
<Router>
|
||
|
<Switch>
|
||
|
<Route path='/' exact component={Login} />
|
||
|
|
||
|
<PublicRoute path='/login' component={Login} />
|
||
|
<PublicRoute path='/register' component={Register} />
|
||
|
|
||
|
<PrivateRoute path='/dashboard' component={Dashboard} />
|
||
|
<PrivateRoute path='/schedule' component={Schedule} />
|
||
|
<PrivateRoute path='/invite' component={Invite} />
|
||
|
<PrivateRoute path='/availability' component={Availability} />
|
||
|
<PrivateRoute path='/schedule' component={Schedule} />
|
||
|
</Switch>
|
||
|
</Router>
|
||
|
);
|
||
|
}
|