This repository has been archived on 2025-03-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
boilerplate/frontend/src/stores/error.store.ts
2025-03-09 04:38:45 -07:00

23 lines
462 B
TypeScript

import { defineStore } from "pinia";
export interface ErrorState {
show: boolean
message: string
}
export const useErrorStore = defineStore("error", {
state: (): ErrorState => ({
show: false,
message: ""
}),
actions: {
summon(message: string) {
this.show = true
this.message = message
},
close() {
this.show = false
this.message = ""
}
}
})