You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
473 B
18 lines
473 B
import { createReducer } from '@reduxjs/toolkit'; |
|
|
|
import { submitMarkersAction } from 'mastodon/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; |
|
}, |
|
); |
|
});
|
|
|