summaryrefslogtreecommitdiff
path: root/client/reducers/audioPlayer.js
blob: 6ad4022627392d21baacec0314a42476c40522a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import client from '../client'

const audioPlayer = (state = {}, action) => {
  switch (action.type) {
    case 'AUDIO_PLAY_FILE':
      return {
        ...state,
        file: action.file
      }
    case 'AUDIO_PAUSE':
      return {
        ...state,
        paused: ! state.paused,
      }
    default:
      return state
  }
}

export default audioPlayer