summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/site/site.reducer.js
blob: fbb53fcd48874591d5e1267c91a5e367ebe8c096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import * as types from 'app/types'

const initialState = {
  peaks: { loading: true },
  text: { loading: true },
}

export default function siteReducer(state = initialState, action) {
  // console.log(action.type, action)
  switch (action.type) {
    case types.peaks.loaded:
      return {
        ...state,
        peaks: action.data,
      }
    case types.text.loaded:
      return {
        ...state,
        text: action.data,
      }
    default:
      return state
  }
}