blob: 2c234f4a56b6cf07f8376d9a2a3886ef18ddc410 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import { defineStore } from "pinia";
export const useErrorStore = defineStore('error', () => {
const error = ref(null as string | null)
const setError = (newError: string) => {
error.value = newError
}
const clearError = () => {
error.value = null
}
return {error, setError, clearError}
})
|