refactor: add user info to authData

This commit is contained in:
Tristan Yang
2022-06-29 10:56:50 +08:00
parent c5694a07b0
commit aff66ad5c8
37 changed files with 94 additions and 104 deletions
+4 -1
View File
@@ -39,11 +39,14 @@ const serverSlice = createSlice({
},
updateInfo(state, action: PayloadAction<Partial<StoredServer>>) {
const values = action.payload || {};
const tmp = { ...state, ...values };
console.log("ssss", tmp);
// todo: check and remove old logic
// Object.keys(values).forEach((_key) => {
// state[_key] = values[_key];
// });
state = { ...state, ...values };
return { ...state, ...values };
}
}
});