schon/storefront/src/stores/app.js
Alexandr SaVBaD Waltz 587c7d3428 Features: 1) Add ESLint dependencies for Vue and Astro projects, including eslint-plugin-astro and eslint-plugin-vue;
Fixes: None;

Extra: 1) Update `package-lock.json` with multiple development-related dependencies, including `vue-eslint-parser` and packages for TypeScript compatibility;
2025-06-01 18:10:45 +03:00

25 lines
No EOL
631 B
JavaScript

import { defineStore } from "pinia";
import { ref, computed } from "vue";
export const useAppStore = defineStore('app', () => {
const activeState = ref(null);
const setActiveState = (state) => {
activeState.value = state;
};
const isSignUp = computed(() => activeState.value === "signUp");
const isSignIn = computed(() => activeState.value === "signIn");
const isForgot = computed(() => activeState.value === "reset-password");
const isReset = computed(() => activeState.value === "new-password");
return {
activeState,
setActiveState,
isSignUp,
isSignIn,
isForgot,
isReset
};
});