diff options
Diffstat (limited to 'stores/error.ts')
| -rw-r--r-- | stores/error.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/stores/error.ts b/stores/error.ts new file mode 100644 index 0000000..19ff289 --- /dev/null +++ b/stores/error.ts @@ -0,0 +1,14 @@ +import { type Event } from "./schedule"; +import { defineStore } from "pinia"; + +export const useErrorStore = defineStore('error', () => { + const error = ref(null as Event | null) + const setError = (event: Event) => { + error.value = event + } + const clearError = () => { + error.value = null + } + + return {error, setError, clearError} +}) |
