[ABANDONED] React/Redux front end for the Flexor social network.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
import { Reducer } from 'redux'
import { ComposerActions } from '../actions/composer' import { ComposerState } from '../types'
const initialState: ComposerState = { installations: [], selected: undefined, }
const reducer: Reducer<ComposerState, ComposerActions> = (state = initialState, action) => { switch (action.type) { case 'COMPOSER_SET_INSTALLATIONS': return { ...state, installations: action.payload, } case 'COMPOSER_SET_SELECTED_INSTALLATION': return { ...state, selected: action.payload, } default: return state } }
export default reducer
|