frontend/app/auth/useAccountStore.ts
2026-03-15 09:03:40 +01:00

25 lines
530 B
TypeScript

import {Account} from "~/auth/Account";
export const useAccountStore = defineStore('account', {
state: () => ({
account: undefined as Account | undefined
}),
getters: {
require: (state) =>
{
return (): Account | undefined =>
{
return state.account;
}
}
},
actions: {
init()
{
Account.get((account: Account) =>
{
this.account = account;
})
}
}
})