diff options
Diffstat (limited to 'web/stores/error.ts')
| -rw-r--r-- | web/stores/error.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/web/stores/error.ts b/web/stores/error.ts new file mode 100644 index 0000000..2c234f4 --- /dev/null +++ b/web/stores/error.ts @@ -0,0 +1,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} +}) |
