blob: b1b4503db85b3bcddac3a668b0620d54e2564322 (
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
25
|
import * as types from '../../types'
// import { session, getDefault, getDefaultInt } from '../../session'
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
}
}
|