1
0
Files
AstralRinth/theseus_gui/src/store/error.js
Geometrically 2877919639 Switch to official launcher auth (#1118)
* Switch to official launcher auth

* add debug info

* Fix build
2024-04-15 13:58:20 -07:00

22 lines
399 B
JavaScript

import { defineStore } from 'pinia'
export const useError = defineStore('errorsStore', {
state: () => ({
errorModal: null,
}),
actions: {
setErrorModal(ref) {
this.errorModal = ref
},
showError(error) {
this.errorModal.show(error)
},
},
})
export const handleSevereError = (err) => {
const error = useError()
error.showError(err)
console.error(err)
}