aboutsummaryrefslogtreecommitdiff
path: root/modern/src/store/geofences.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/store/geofences.js')
-rw-r--r--modern/src/store/geofences.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/modern/src/store/geofences.js b/modern/src/store/geofences.js
index f2b7666..0c83965 100644
--- a/modern/src/store/geofences.js
+++ b/modern/src/store/geofences.js
@@ -4,8 +4,15 @@ const { reducer, actions } = createSlice({
name: 'geofences',
initialState: {
items: {},
+ selectedId: null,
},
reducers: {
+ select(state, action) {
+ state.selectedId = action.payload.id;
+ },
+ unselect(state, action) {
+ state.selectedId = null;
+ },
refresh(state, action) {
state.items = {};
action.payload.forEach((item) => state.items[item.id] = item);