aboutsummaryrefslogtreecommitdiffstats
path: root/stores/error.ts
blob: 19ff289027c5441f2d16b42601aabef119c9184a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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}
})