aboutsummaryrefslogtreecommitdiff
path: root/modern/src/store/maintenances.js
diff options
context:
space:
mode:
authorAshutosh Bishnoi <mail2bishnoi@gmail.com>2021-04-20 12:15:13 +0530
committerAshutosh Bishnoi <mail2bishnoi@gmail.com>2021-04-20 12:15:13 +0530
commit2d5ec8721c2d9ae3d519dd5ff267a05b5f1ab96b (patch)
tree3e352b219ccfa178ca7f678d6a434a104bfdd987 /modern/src/store/maintenances.js
parent047bf86480e2b3e215c13df2af0da456a664b507 (diff)
downloadtrackermap-web-2d5ec8721c2d9ae3d519dd5ff267a05b5f1ab96b.tar.gz
trackermap-web-2d5ec8721c2d9ae3d519dd5ff267a05b5f1ab96b.tar.bz2
trackermap-web-2d5ec8721c2d9ae3d519dd5ff267a05b5f1ab96b.zip
Created mostly used stores
Diffstat (limited to 'modern/src/store/maintenances.js')
-rw-r--r--modern/src/store/maintenances.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/modern/src/store/maintenances.js b/modern/src/store/maintenances.js
new file mode 100644
index 00000000..0813f6b6
--- /dev/null
+++ b/modern/src/store/maintenances.js
@@ -0,0 +1,16 @@
+import { createSlice } from '@reduxjs/toolkit';
+
+const { reducer, actions } = createSlice({
+ name: 'maintenances',
+ initialState: {
+ items: {},
+ },
+ reducers: {
+ update(state, action) {
+ action.payload.forEach(item => state.items[item['id']] = item);
+ },
+ }
+});
+
+export { actions as maintenancesActions };
+export { reducer as maintenancesReducer };