aboutsummaryrefslogtreecommitdiff
path: root/modern/src/store
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-09-20 17:56:56 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-09-20 17:56:56 -0700
commitb2cd88bbbad82654057cec8aec7415a8caca667e (patch)
treec9d8485cdd5f2e4fd7558b963d095027c3913e86 /modern/src/store
parentfc990dcc50650862c4f12a1a530b98bbd36ea4b8 (diff)
downloadtrackermap-web-b2cd88bbbad82654057cec8aec7415a8caca667e.tar.gz
trackermap-web-b2cd88bbbad82654057cec8aec7415a8caca667e.tar.bz2
trackermap-web-b2cd88bbbad82654057cec8aec7415a8caca667e.zip
Use async functions
Diffstat (limited to 'modern/src/store')
-rw-r--r--modern/src/store/session.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/modern/src/store/session.js b/modern/src/store/session.js
index 772368c4..9f98b8ae 100644
--- a/modern/src/store/session.js
+++ b/modern/src/store/session.js
@@ -3,13 +3,17 @@ import { createSlice } from '@reduxjs/toolkit';
const { reducer, actions } = createSlice({
name: 'session',
initialState: {
- authenticated: false,
+ server: null,
+ user: null,
},
reducers: {
- authenticated(state, action) {
- state.authenticated = action.payload;
+ updateServer(state, action) {
+ state.server = action.payload;
},
- }
+ updateUser(state, action) {
+ state.user = action.payload;
+ },
+ },
});
export { actions as sessionActions };