aboutsummaryrefslogtreecommitdiff
path: root/modern/src/store/geofences.js
diff options
context:
space:
mode:
authorAshutosh Bishnoi <mail2bishnoi@gmail.com>2021-04-13 17:48:27 +0530
committerAshutosh Bishnoi <mail2bishnoi@gmail.com>2021-04-13 17:48:27 +0530
commit48489f116b996ceebd7e3a8d08b2223d4f8021cf (patch)
tree350f93942bf9ce96fbd040580b71883be28061c1 /modern/src/store/geofences.js
parentbfe5b547bc7c6dee70fc95034a175a5c9d8012af (diff)
downloadtrackermap-web-48489f116b996ceebd7e3a8d08b2223d4f8021cf.tar.gz
trackermap-web-48489f116b996ceebd7e3a8d08b2223d4f8021cf.tar.bz2
trackermap-web-48489f116b996ceebd7e3a8d08b2223d4f8021cf.zip
Event Type Localization and geofence store creation
Diffstat (limited to 'modern/src/store/geofences.js')
-rw-r--r--modern/src/store/geofences.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/modern/src/store/geofences.js b/modern/src/store/geofences.js
new file mode 100644
index 00000000..c5e58147
--- /dev/null
+++ b/modern/src/store/geofences.js
@@ -0,0 +1,16 @@
+import { createSlice } from '@reduxjs/toolkit';
+
+const { reducer, actions } = createSlice({
+ name: 'geofences',
+ initialState: {
+ items: {},
+ },
+ reducers: {
+ update(state, action) {
+ action.payload.forEach(item => state.items[item['id']] = item);
+ },
+ }
+});
+
+export { actions as geofencesActions };
+export { reducer as geofencesReducer };