mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-05 04:29:03 +01:00
af0a1a8774
Port d558dfd77d
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
18 lines
564 B
TypeScript
18 lines
564 B
TypeScript
import { createReducer, isAnyOf } from '@reduxjs/toolkit';
|
|
|
|
import {
|
|
fetchNotificationPolicy,
|
|
updateNotificationsPolicy,
|
|
} from 'flavours/glitch/actions/notification_policies';
|
|
import type { NotificationPolicy } from 'flavours/glitch/models/notification_policy';
|
|
|
|
export const notificationPolicyReducer =
|
|
createReducer<NotificationPolicy | null>(null, (builder) => {
|
|
builder.addMatcher(
|
|
isAnyOf(
|
|
fetchNotificationPolicy.fulfilled,
|
|
updateNotificationsPolicy.fulfilled,
|
|
),
|
|
(_state, action) => action.payload,
|
|
);
|
|
});
|