soapbox/app/gabsocial/reducers/instance.js

14 wiersze
350 B
JavaScript
Czysty Zwykły widok Historia

2020-04-01 20:05:52 +00:00
import { INSTANCE_IMPORT } from '../actions/instance';
import { Map as ImmutableMap, fromJS } from 'immutable';
const initialState = ImmutableMap();
export default function instance(state = initialState, action) {
switch(action.type) {
case INSTANCE_IMPORT:
return ImmutableMap(fromJS(action.instance));
default:
return state;
}
};