feat: remove account button
This commit is contained in:
parent
6f0dd7b336
commit
061f5c942b
3 changed files with 28 additions and 10 deletions
|
|
@ -187,12 +187,13 @@ class LocalStorageService {
|
|||
this.accounts.push(account)
|
||||
}
|
||||
window.localStorage.setItem(StorageKey.ACCOUNTS, JSON.stringify(this.accounts))
|
||||
return account
|
||||
return this.accounts
|
||||
}
|
||||
|
||||
removeAccount(account: TAccount) {
|
||||
this.accounts = this.accounts.filter((act) => !isSameAccount(act, account))
|
||||
window.localStorage.setItem(StorageKey.ACCOUNTS, JSON.stringify(this.accounts))
|
||||
return this.accounts
|
||||
}
|
||||
|
||||
switchAccount(account: TAccount | null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue