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