aboutsummaryrefslogtreecommitdiff
path: root/modern/src/store/notifications.js
blob: be8a98904bdbac4002284a750d1afa7cc64897fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { createSlice } from '@reduxjs/toolkit';

const { reducer, actions } = createSlice({
  name: 'notifications',
  initialState: {
    items: {},
  },
  reducers: {
    update(state, action) {
      action.payload.forEach(item => state.items[item['id']] = item);
    },
  }
});

export { actions as notificationsActions };
export { reducer as notificationsReducer };