Commit 0e20df49 authored by Eugen Rochko's avatar Eugen Rochko

Update src/reducer.js

parent 40a15b6b
Pipeline #412 passed with stages
in 1 minute and 8 seconds
......@@ -28,12 +28,17 @@ const initialState = {
},
};
const blacklist = [
'mastodon.social',
'abdl.link',
];
export default function reducer(state = initialState, action) {
switch(action.type) {
case LOCALE_CHANGE:
return { ...state, locale: action.data };
case INSTANCES_FETCH_SUCCESS:
return { ...state, instances: action.data.filter(instance => instance.name !== 'mastodon.social') };
return { ...state, instances: action.data.filter(instance => blacklist.indexOf(instance.name) === -1) };
case FILTER_CATEGORY_CHANGE:
return { ...state, filter: { ...state.filter, category: action.data } };
case FILTER_LANGUAGE_CHANGE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment