Jonathan Druart
b8112bbe6f
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
24 lines
684 B
JavaScript
24 lines
684 B
JavaScript
import { useMainStore } from "./stores/main";
|
|
|
|
export const setError = function (new_error) {
|
|
const mainStore = useMainStore();
|
|
const { setError } = mainStore;
|
|
setError("Something went wrong: " + new_error);
|
|
};
|
|
|
|
export const setWarning = function (new_warning) {
|
|
const mainStore = useMainStore();
|
|
const { setWarning } = mainStore;
|
|
setWarning(new_warning);
|
|
};
|
|
|
|
export const setMessage = function (message) {
|
|
const mainStore = useMainStore();
|
|
const { setMessage } = mainStore;
|
|
setMessage(message);
|
|
};
|
|
export const removeMessages = function () {
|
|
const mainStore = useMainStore();
|
|
const { removeMessages } = mainStore;
|
|
removeMessages();
|
|
};
|