15 lines
276 B
TypeScript
15 lines
276 B
TypeScript
import type { IUser } from "~/types";
|
|
|
|
export const useLoginState = defineStore("loginState", () => {
|
|
const isLoggedIn = ref(false);
|
|
|
|
const token = ref<string | null>(null);
|
|
const user = ref<IUser>({} as IUser);
|
|
|
|
return {
|
|
isLoggedIn,
|
|
token,
|
|
user,
|
|
};
|
|
});
|