diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-20 17:56:56 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-20 17:56:56 -0700 |
commit | b2cd88bbbad82654057cec8aec7415a8caca667e (patch) | |
tree | c9d8485cdd5f2e4fd7558b963d095027c3913e86 /modern/src/store/session.js | |
parent | fc990dcc50650862c4f12a1a530b98bbd36ea4b8 (diff) | |
download | trackermap-web-b2cd88bbbad82654057cec8aec7415a8caca667e.tar.gz trackermap-web-b2cd88bbbad82654057cec8aec7415a8caca667e.tar.bz2 trackermap-web-b2cd88bbbad82654057cec8aec7415a8caca667e.zip |
Use async functions
Diffstat (limited to 'modern/src/store/session.js')
-rw-r--r-- | modern/src/store/session.js | 12 |
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 }; |