From 925c51d94f25021cb4fbf77cee7b0cb7f611692b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 14 Sep 2023 06:36:40 -0700 Subject: Limit notifications buffer --- modern/src/store/events.js | 1 + 1 file changed, 1 insertion(+) (limited to 'modern') diff --git a/modern/src/store/events.js b/modern/src/store/events.js index d4f313c0..35e7081e 100644 --- a/modern/src/store/events.js +++ b/modern/src/store/events.js @@ -8,6 +8,7 @@ const { reducer, actions } = createSlice({ reducers: { add(state, action) { state.items.unshift(...action.payload); + state.items.splice(50); }, delete(state, action) { state.items = state.items.filter((item) => item.id !== action.payload.id); -- cgit v1.2.3