mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 23:41:37 +01:00
059e10e546
Port 27d014a7fa
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
18 lines
480 B
TypeScript
18 lines
480 B
TypeScript
import { createReducer } from '@reduxjs/toolkit';
|
|
|
|
import { submitMarkersAction } from 'flavours/glitch/actions/markers';
|
|
|
|
const initialState = {
|
|
home: '0',
|
|
notifications: '0',
|
|
};
|
|
|
|
export const markersReducer = createReducer(initialState, (builder) => {
|
|
builder.addCase(
|
|
submitMarkersAction.fulfilled,
|
|
(state, { payload: { home, notifications } }) => {
|
|
if (home) state.home = home;
|
|
if (notifications) state.notifications = notifications;
|
|
},
|
|
);
|
|
});
|