Claptrap-ui/src/stores/user.ts

14 lines
325 B
TypeScript
Raw Normal View History

2022-05-21 01:07:31 +02:00
import { defineStore } from "pinia";
export const useUserStore = defineStore("user",{
state: () => ({
name: undefined as string | undefined,
discordId: undefined as string | undefined,
token: undefined as string | undefined,
}),
getters: {
isLoggedIn: (state) => !!state.token,
},
actions: {},
});