mirror of https://gitlab.com/ecentrics/concordia
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.7 KiB
45 lines
1.7 KiB
import React from 'react';
|
|
import { render } from 'react-dom';
|
|
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
|
|
import { syncHistoryWithStore } from 'react-router-redux';
|
|
import { DrizzleProvider } from 'drizzle-react';
|
|
|
|
// Layout
|
|
import CoreLayout from './layouts/CoreLayout/CoreLayout';
|
|
|
|
// Containers
|
|
import LoadingContainer from './containers/LoadingContainer';
|
|
import PrivateRouteContainer from './containers/PrivateRouteContainer';
|
|
|
|
import HomeContainer from './containers/HomeContainer';
|
|
import TopicContainer from './containers/TopicContainer';
|
|
import StartTopicContainer from './containers/StartTopicContainer';
|
|
import ProfileContainer from './containers/ProfileContainer';
|
|
import NotFoundView from './components/NotFoundView';
|
|
|
|
import store from './redux/store';
|
|
import drizzleOptions from './util/drizzleOptions';
|
|
|
|
import './assets/css/index.css';
|
|
|
|
// Initialize react-router-redux.
|
|
const history = syncHistoryWithStore(browserHistory, store);
|
|
|
|
render((
|
|
<DrizzleProvider options={drizzleOptions} store={store}>
|
|
<LoadingContainer>
|
|
<Router history={history}>
|
|
<Route path="/" component={CoreLayout}>
|
|
<IndexRoute component={HomeContainer} />
|
|
<PrivateRouteContainer path="/topic/:topicId/:topicSubject/:postId" component={TopicContainer} redirectTo="/" />
|
|
<PrivateRouteContainer path='/profile' component={ProfileContainer} redirectTo="/" />
|
|
<PrivateRouteContainer path='/startTopic' component={StartTopicContainer} redirectTo="/" />
|
|
<Route path='/404' component={NotFoundView} />
|
|
<Route path='*' component={NotFoundView} />
|
|
</Route>
|
|
</Router>
|
|
</LoadingContainer>
|
|
</DrizzleProvider>
|
|
),
|
|
document.getElementById('root')
|
|
);
|