import { defineStore } from "pinia";

export const useUserStore = defineStore("userStore", {
  state: () => ({
    userInfo: {},
  }),
  getters: {
    getUserInfo: (state) => state.userInfo,
  },
  actions: {
    setUserInfo(userInfo) {
      this.userInfo = userInfo;
    },
  },
  persist: {
    storage: window.sessionStorage,
  },
});
