From d3a027a92958371acaf35d300770a4c864df7231 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 21 Jun 2020 17:42:00 -0700 Subject: Implement device removal --- modern/src/store/devices.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modern/src/store') diff --git a/modern/src/store/devices.js b/modern/src/store/devices.js index 0d96e98d..3d7be3e6 100644 --- a/modern/src/store/devices.js +++ b/modern/src/store/devices.js @@ -12,7 +12,10 @@ const { reducer, actions } = createSlice({ }, select(state, action) { state.selectedId = action.payload.id; - } + }, + remove(state, action) { + delete state.items[action.payload]; + }, } }); -- cgit v1.2.3