hippofish/packages/client/src/reactiveAccount.ts

10 lines
247 B
TypeScript
Raw Normal View History

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