actions.js
1 year ago
default-state.js
1 year ago
reducer.js
1 year ago
state.js
1 year ago
use-wpchill-state.js
1 year ago
reducer.js
15 lines
| 1 | export default function reducer( state, action ) { |
| 2 | switch ( action.type ) { |
| 3 | case 'SET_CLOSE_BUBBLE': |
| 4 | return { ...state, closedBubble: action.payload }; |
| 5 | case 'SET_SHOW_CONTAINER': |
| 6 | return { ...state, showContainer: action.payload }; |
| 7 | case 'SET_OPEN_PANELS': |
| 8 | return { ...state, openPanels: action.payload }; |
| 9 | case 'SET_VISIBLE_NOTIFICATIONS': |
| 10 | return { ...state, visibleNotifications: action.payload }; |
| 11 | default: |
| 12 | return state; |
| 13 | } |
| 14 | } |
| 15 |