opnform/resources/js/stores/errors.js

17 lines
283 B
JavaScript

import { defineStore } from 'pinia'
export const namespaced = true
export const useErrorsStore = defineStore('errors', {
state: () => ({
content: null
}),
actions: {
set (error) {
this.content = error
},
clear () {
this.content = null
}
}
})