brutal-legends/src/reducers/visibility-filter.ts
2020-03-05 20:14:09 +01:00

17 lines
351 B
TypeScript

import { SET_VISIBILITY_FILTER } from "../actions";
type Action = {
type: string;
payload: {
filter: string;
};
};
export default (state: string = "", action: Action) => {
switch (action.type) {
case SET_VISIBILITY_FILTER:
return action.payload.filter;
default:
return state;
}
};