firefish/packages/client/src/reactiveAccount.ts
2023-12-06 05:02:20 +09:00

9 lines
252 B
TypeScript

import { reactive } from "vue";
import type { Account } from "@/account";
const accountData = localStorage.getItem("account");
// TODO: 外部からはreadonlyに
export const $i = accountData
? reactive(JSON.parse(accountData) as Account)
: null;