1
0
mirror of https://github.com/SomboChea/ui synced 2024-12-25 13:44:31 +07:00

fix: remove token from AppState

This commit is contained in:
Griffithtp 2019-07-09 21:00:59 +01:00
parent 6a421ab22d
commit 78b4c3fac1

View File

@ -25,7 +25,6 @@ export interface AppStateInterface {
logoUrl: string;
user: {
username?: string;
token?: string;
};
scope: string;
showLoginModal: boolean;
@ -133,7 +132,7 @@ export default class App extends Component<{}, AppStateInterface> {
if (username && token) {
storage.setItem('username', username);
storage.setItem('token', token);
this.setLoggedUser(username, token);
this.setLoggedUser(username);
}
if (error) {
@ -144,7 +143,7 @@ export default class App extends Component<{}, AppStateInterface> {
}
};
public setLoggedUser = (username, token) => {
public setLoggedUser = username => {
this.setState({
user: {
username,