chuckya/app/javascript/flavours/glitch/reducers/notification_policy.js
Eugen Rochko 13c9524436 [Glitch] Add notification policies and notification requests in web UI
Port c10bbf5fe3 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2024-03-13 18:38:46 +01:00

12 lines
334 B
JavaScript

import { fromJS } from 'immutable';
import { NOTIFICATION_POLICY_FETCH_SUCCESS } from 'flavours/glitch/actions/notifications';
export const notificationPolicyReducer = (state = null, action) => {
switch(action.type) {
case NOTIFICATION_POLICY_FETCH_SUCCESS:
return fromJS(action.policy);
default:
return state;
}
};