(state = null, action)
| 2 | import {mergeDeepRight} from 'ramda'; |
| 3 | |
| 4 | export default function config(state = null, action) { |
| 5 | if (action.type === getAction('SET_CONFIG')) { |
| 6 | // Put the components childrenProps in windows for side usage. |
| 7 | window.__dashprivate_childrenProps = mergeDeepRight( |
| 8 | window.__dashprivate_childrenProps || {}, |
| 9 | action.payload.children_props |
| 10 | ); |
| 11 | return action.payload; |
| 12 | } else if (action.type === getAction('ADD_HTTP_HEADERS')) { |
| 13 | return mergeDeepRight(state, { |
| 14 | fetch: { |
| 15 | headers: action.payload |
| 16 | } |
| 17 | }); |
| 18 | } |
| 19 | return state; |
| 20 | } |
no test coverage detected
searching dependent graphs…