-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathmain.jsx
58 lines (54 loc) · 2.89 KB
/
main.jsx
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, Link, IndexRoute } from 'react-router';
import { browserHistory } from 'react-router'
import Index from './pages/index.jsx';
import Solutions from './pages/solutions.jsx';
import Technologies from './pages/technologies.jsx';
import About from './pages/about.jsx';
import Donate from './pages/donate.jsx';
import Resources from './pages/resources.jsx';
import Faq from './pages/faq.jsx';
import Download from './pages/download.jsx';
import EmergentConsensusBU from './pages/emergent-consensus-bu.jsx';
import EmergentConsensus from './pages/emergent-consensus.jsx';
import DevelopTestingAccord from './pages/develop-testing-accord.jsx';
import Login from './pages/login.jsx';
import BlogList from './pages/models/blog-list.jsx';
import BlogPost from './pages/models/blog-post.jsx';
import ContentDisplay from './pages/content-display.jsx';
import NotFound from './pages/not-found.jsx';
import Auth from './pages/protected/auth.jsx';
import Dashboard from './pages/protected/dashboard.jsx';
import RealmFormWrapper from './pages/protected/realm-form-wrapper.jsx';
ReactDOM.render((
<Router onUpdate={ () => window.scrollTo(0, 0) } history={ browserHistory }>
<Route path='/'>
<IndexRoute component={ Index } />
<Route path='index' component={ Index } />
<Route path="solutions(/:section)" component={ Solutions } />
<Route path='technologies(/:section)' component={ Technologies } />
<Route path='about(/:section)' component={ About } />
<Route path='donate' component={ Donate } />
<Route path='resources(/:section)' component={ Resources } />
<Route path='faq(/:section)' component={ Faq } />
<Route path='download(/:section)' component={ Download } />
<Route path='emergent-consensusBU' component={ EmergentConsensusBU } />
<Route path='emergent-consensus' component={ EmergentConsensus } />
<Route path='cash-development-plan' component={ DevelopTestingAccord } />
<Route path='login' component={ Login } />
// All paths within Auth require JWT authentication via Passport middleware. See /src/index.js.
<Route component={ Auth }>
<Route path='dashboard' component={ Dashboard } />
<Route path='create/:realmType' component={ RealmFormWrapper } />
<Route path='update/:realmType/:uid' component={ RealmFormWrapper } />
</Route>
<Route path='blog' component={ BlogList } />
<Route path='blog/:uid' component={ BlogPost } />
<Route path='content/:uid' component={ ContentDisplay } />
<Route path='not-found' component={ NotFound } />
<Route path='*' component={ NotFound } />
</Route>
</Router>
), document.getElementById('react-app'));