simplify announcements reducer a bit

This commit is contained in:
ChaosExAnima 2025-11-04 18:07:18 +01:00
parent afd5d5c2e5
commit b7d4c4500d
No known key found for this signature in database
GPG Key ID: 8F2B333100FB6117

View File

@ -61,9 +61,7 @@ const updateAnnouncement = (state, announcement) => {
export default function announcementsReducer(state = initialState, action) {
switch(action.type) {
case ANNOUNCEMENTS_TOGGLE_SHOW:
return state.withMutations(map => {
map.set('show', !map.get('show'));
});
return state.set('show', !state.get('show'));
case ANNOUNCEMENTS_FETCH_REQUEST:
return state.set('isLoading', true);
case ANNOUNCEMENTS_FETCH_SUCCESS: