2016-10-03 14:44:27 +13:00
|
|
|
/**
|
|
|
|
|
* Base-level application wrapper
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
|
|
import React, { PropTypes } from 'react';
|
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
|
import { Provider } from 'react-redux'
|
|
|
|
|
import { createStore } from 'redux'
|
|
|
|
|
import { Router, Route, Link, hashHistory } from 'react-router'
|
|
|
|
|
|
2016-10-03 15:22:15 +13:00
|
|
|
import store from './bootstrap.js'
|
2016-10-17 10:39:11 +13:00
|
|
|
|
2016-10-17 22:00:29 +13:00
|
|
|
require('../scss/app.scss');
|
|
|
|
|
|
2016-10-17 10:39:11 +13:00
|
|
|
import App from './views/App'
|
|
|
|
|
import Album from './views/Album'
|
|
|
|
|
import Artist from './views/Artist'
|
|
|
|
|
import Queue from './views/Queue'
|
|
|
|
|
import Settings from './views/Settings'
|
|
|
|
|
import LibraryArtists from './views/LibraryArtists'
|
2016-10-20 21:38:01 +13:00
|
|
|
import LibraryAlbums from './views/LibraryAlbums'
|
|
|
|
|
import LibraryTracks from './views/LibraryTracks'
|
2016-10-03 14:44:27 +13:00
|
|
|
|
|
|
|
|
ReactDOM.render(
|
2016-10-03 15:22:15 +13:00
|
|
|
<Provider store={store}>
|
2016-10-03 14:44:27 +13:00
|
|
|
<Router history={hashHistory}>
|
|
|
|
|
<Route path="/" component={App}>
|
|
|
|
|
|
2016-10-17 10:39:11 +13:00
|
|
|
<Route path="library/artists" component={LibraryArtists} />
|
2016-10-20 21:38:01 +13:00
|
|
|
<Route path="library/albums" component={LibraryAlbums} />
|
|
|
|
|
<Route path="library/tracks" component={LibraryTracks} />
|
2016-10-16 12:37:37 +13:00
|
|
|
<Route path="album/:uri" component={Album} />
|
2016-10-17 10:39:11 +13:00
|
|
|
<Route path="artist/:uri" component={Artist} />
|
2016-10-03 15:22:15 +13:00
|
|
|
<Route path="queue" component={Queue} />
|
2016-10-17 10:39:11 +13:00
|
|
|
<Route path="settings" component={Settings} />
|
2016-10-03 14:44:27 +13:00
|
|
|
|
|
|
|
|
</Route>
|
|
|
|
|
</Router>
|
|
|
|
|
</Provider>,
|
|
|
|
|
document.getElementById('app')
|
|
|
|
|
);
|