From b2cd88bbbad82654057cec8aec7415a8caca667e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 20 Sep 2020 17:56:56 -0700 Subject: Use async functions --- modern/src/store/session.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'modern/src/store') diff --git a/modern/src/store/session.js b/modern/src/store/session.js index 772368c..9f98b8a 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 }; -- cgit v1.2.3