opnform-host-nginx/client/stores/errors.js

16 lines
253 B
JavaScript
Raw Normal View History

import { defineStore } from "pinia"
2023-12-09 15:47:03 +01:00
export const useErrorsStore = defineStore("errors", {
2023-12-09 15:47:03 +01:00
state: () => ({
content: null,
2023-12-09 15:47:03 +01:00
}),
actions: {
set(error) {
2023-12-09 15:47:03 +01:00
this.content = error
},
clear() {
2023-12-09 15:47:03 +01:00
this.content = null
},
},
2023-12-09 15:47:03 +01:00
})