mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-09 01:45:42 +03:00
9 lines
297 B
JavaScript
9 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;
|
|
}
|