diff --git a/src/about/index.js b/src/about/index.js deleted file mode 100755 index cc272b63..00000000 --- a/src/about/index.js +++ /dev/null @@ -1,8 +0,0 @@ - -import React from 'react' - -export default React.createClass({ - render() { - return
About
- } -}) \ No newline at end of file diff --git a/src/actions.js b/src/actions.js deleted file mode 100755 index 8d539dee..00000000 --- a/src/actions.js +++ /dev/null @@ -1,32 +0,0 @@ - -/** - * Actions and Action Creators - **/ - -export const TOGGLE_DONE = 'TOGGLE_DONE' -export const ADD_TODO = 'ADD_TODO' -export const SET_ALBUM = 'SET_ALBUM' - -export function toggleDone( id ){ - return { - type: TOGGLE_DONE, - id: id - } -} - -export function addTodo( title ){ - return { - type: ADD_TODO, - id: title, - title: title - } -} - -export function setAlbum( album ){ - return { - type: SET_ALBUM, - album: album - } -} - - diff --git a/src/common/actions.js b/src/actions/albumActions.js similarity index 100% rename from src/common/actions.js rename to src/actions/albumActions.js diff --git a/src/actions/index.js b/src/actions/index.js new file mode 100755 index 00000000..c632dc3a --- /dev/null +++ b/src/actions/index.js @@ -0,0 +1,3 @@ + +import albumActions from './albumActions' + diff --git a/src/actions/queueActions.js b/src/actions/queueActions.js new file mode 100755 index 00000000..e69de29b diff --git a/src/bootstrap.js b/src/bootstrap.js new file mode 100755 index 00000000..7d5e29d7 --- /dev/null +++ b/src/bootstrap.js @@ -0,0 +1,17 @@ + +console.info('Bootstrapping...'); + +import { createStore } from 'redux' +import reducer from './reducers/index' +import Services from './services/Services' + +// start all our services +Promise.all(Services.setup()) + .then(() => { + console.info('Services started...'); + }); + +// create our global store +let store = createStore( reducer, {} ); + +export default store; diff --git a/src/common/Album.js b/src/components/Album.js similarity index 81% rename from src/common/Album.js rename to src/components/Album.js index 562fdcb0..b04f67ff 100755 --- a/src/common/Album.js +++ b/src/components/Album.js @@ -3,8 +3,8 @@ import React, { PropTypes } from 'react' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' -import Tracklist from '../common/Tracklist' -import * as actions from './actions' +import TrackList from './TrackList' +import * as albumActions from '../actions/albumActions' class Album extends React.Component{ @@ -47,7 +47,7 @@ class Album extends React.Component{

{ this.state.album.name }

{ this.state.album.label }

- +
); } @@ -77,7 +77,7 @@ const mapStateToProps = (state, ownProps) => { const mapDispatchToProps = (dispatch) => { return { - actions: bindActionCreators(actions, dispatch) + albumActions: bindActionCreators(albumActions, dispatch) } } diff --git a/src/App.js b/src/components/App.js similarity index 89% rename from src/App.js rename to src/components/App.js index b7eb9178..824ac903 100755 --- a/src/App.js +++ b/src/components/App.js @@ -5,8 +5,8 @@ import { createStore, bindActionCreators } from 'redux' import { Link } from 'react-router' import { connect } from 'react-redux' -import * as actions from './actions' -import Services from './services/Services' +import * as actions from '../actions/index' +import Services from '../services/Services' /** @@ -49,7 +49,7 @@ class App extends React.Component{ return (