mirror of
https://github.com/SomboChea/ui
synced 2024-11-24 06:54:27 +07:00
fix: remove token from AppState
This commit is contained in:
parent
6a421ab22d
commit
78b4c3fac1
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user