aboutsummaryrefslogtreecommitdiffstats
path: root/web/stores/error.ts
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2025-08-14 18:07:12 +0100
committerLeonardo Bishop <me@leonardobishop.com>2025-08-14 18:07:12 +0100
commit4697556cac819c47d068819b9fc9c3b4ea84e279 (patch)
treeb832d8fc6b643a8b9d0eeca35c1268e1649da731 /web/stores/error.ts
parentdd49c9205bb04844b686b9c3396c40eb49d25826 (diff)
Merge confplanner-web and replace fiber with native net/http
Diffstat (limited to 'web/stores/error.ts')
-rw-r--r--web/stores/error.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/web/stores/error.ts b/web/stores/error.ts
new file mode 100644
index 0000000..2c234f4
--- /dev/null
+++ b/web/stores/error.ts
@@ -0,0 +1,13 @@
+import { defineStore } from "pinia";
+
+export const useErrorStore = defineStore('error', () => {
+ const error = ref(null as string | null)
+ const setError = (newError: string) => {
+ error.value = newError
+ }
+ const clearError = () => {
+ error.value = null
+ }
+
+ return {error, setError, clearError}
+})