Skip to content

Commit 8bc35ed

Browse files
committed
Create store and hook up reducers
1 parent bf9e2e3 commit 8bc35ed

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

app/reducers/playback.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function setHasStoppedState(hasStopped) {
4949
return newState;
5050
}
5151

52-
export function setPlaybackState(state = initialState, action) {
52+
export function playbackReducer(state = initialState, action) {
5353
switch (action.type) {
5454
case IS_PLAYING :
5555
return Object.assign({}, state, setIsPlayingState(action.isPlaying));

app/store/configurePlayerStore.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict';
2+
3+
import { createStore } from 'redux';
4+
import { playbackReducer } from '../reducers/playback';
5+
6+
export default function () {
7+
return createStore(playbackReducer);
8+
}

test/reducers/playback.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import assert from 'assert';
44
import { IS_PLAYING } from '../../app/actions/isPlaying';
55
import { IS_PAUSED } from '../../app/actions/isPaused';
66
import { HAS_STOPPED } from '../../app/actions/hasStopped';
7-
import { setPlaybackState as playbackReducer } from '../../app/reducers/playback';
7+
import { playbackReducer } from '../../app/reducers/playback';
88

99
describe('playbackState', () => {
1010
describe('isPlaying property', () => {

0 commit comments

Comments
 (0)