diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2025-01-17 13:42:21 +0000 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2025-01-17 13:42:21 +0000 |
| commit | 70ebc77f843207a1d4b46c8d960dafbff37e7e2e (patch) | |
| tree | 2d03f7a66b877bb6ffa2f92c0504ac90f26db55f /stores/error.ts | |
Initial commit
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} +}) |
