mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-12-20 18:51:53 +03:00
10 lines
297 B
JavaScript
10 lines
297 B
JavaScript
|
import store from './store';
|
||
|
|
||
|
export function getCurrentAccount() {
|
||
|
const accounts = store.local.getJSON('accounts') || [];
|
||
|
const currentAccount = store.session.get('currentAccount');
|
||
|
const account =
|
||
|
accounts.find((a) => a.info.id === currentAccount) || accounts[0];
|
||
|
return account;
|
||
|
}
|