2020-03-05 08:07:46 +01:00
|
|
|
import { SET_VISIBILITY_FILTER } from "../actions";
|
|
|
|
|
|
2020-03-05 18:09:48 +01:00
|
|
|
type Action = {
|
2020-03-05 08:07:46 +01:00
|
|
|
type: string;
|
|
|
|
|
payload: {
|
|
|
|
|
filter: string;
|
|
|
|
|
};
|
2020-03-05 18:09:48 +01:00
|
|
|
};
|
2020-03-05 08:07:46 +01:00
|
|
|
|
2020-03-05 18:09:48 +01:00
|
|
|
export default (state: string = "", action: Action) => {
|
2020-03-05 08:07:46 +01:00
|
|
|
switch (action.type) {
|
|
|
|
|
case SET_VISIBILITY_FILTER:
|
|
|
|
|
return action.payload.filter;
|
|
|
|
|
default:
|
|
|
|
|
return state;
|
|
|
|
|
}
|
|
|
|
|
};
|