diff options
author | Iván Ávalos <avalos@disroot.org> | 2021-12-07 15:27:05 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2021-12-07 15:27:05 -0600 |
commit | bbe3e712ef0c616418057f1b9916984da18e7b38 (patch) | |
tree | 439e41d4ab145f7a344190e33928e0e8cbec4a5c /modern/src/store | |
parent | 8164e6b30e007a3eeaea25decf98ccb098d9e85f (diff) | |
download | etbsa-traccar-web-bbe3e712ef0c616418057f1b9916984da18e7b38.tar.gz etbsa-traccar-web-bbe3e712ef0c616418057f1b9916984da18e7b38.tar.bz2 etbsa-traccar-web-bbe3e712ef0c616418057f1b9916984da18e7b38.zip |
More rebranding para ETBSA!
Diffstat (limited to 'modern/src/store')
-rw-r--r-- | modern/src/store/index.js | 3 | ||||
-rw-r--r-- | modern/src/store/ui.js | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/modern/src/store/index.js b/modern/src/store/index.js index 6e2bb20..ebd3f43 100644 --- a/modern/src/store/index.js +++ b/modern/src/store/index.js @@ -7,6 +7,7 @@ import { geofencesReducer as geofences } from './geofences'; import { groupsReducer as groups } from './groups'; import { driversReducer as drivers } from './drivers'; import { maintenancesReducer as maintenances } from './maintenances'; +import { uiReducer as ui } from './ui'; const reducer = combineReducers({ session, @@ -16,6 +17,7 @@ const reducer = combineReducers({ groups, drivers, maintenances, + ui }); export { sessionActions } from './session'; @@ -25,5 +27,6 @@ export { geofencesActions } from './geofences'; export { groupsActions } from './groups'; export { driversActions } from './drivers'; export { maintenancesActions } from './maintenances'; +export { uiActions } from './ui'; export default configureStore({ reducer }); diff --git a/modern/src/store/ui.js b/modern/src/store/ui.js new file mode 100644 index 0000000..0783492 --- /dev/null +++ b/modern/src/store/ui.js @@ -0,0 +1,16 @@ +import { createSlice } from '@reduxjs/toolkit'; + +const { reducer, actions } = createSlice({ + name: 'ui', + initialState: { + collapsed: true + }, + reducers: { + setCollapsed(state, action) { + state.collapsed = action.payload; + }, + }, +}); + +export { actions as uiActions }; +export { reducer as uiReducer }; |