summaryrefslogtreecommitdiff
path: root/store/index.js
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-14 18:29:25 +0200
committerSanto Cariotti <santo@dcariotti.me>2022-09-14 18:29:25 +0200
commit961aceb727227a73859414070e3cc1b09d2281b0 (patch)
treef147fe6140374947c822de2b817d8fdc22960c04 /store/index.js
parent0dfb5fd5fb29df8695fbde823e04f18cceb31be5 (diff)
Add store
Diffstat (limited to 'store/index.js')
-rw-r--r--store/index.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/store/index.js b/store/index.js
new file mode 100644
index 0000000..eabe2e5
--- /dev/null
+++ b/store/index.js
@@ -0,0 +1,14 @@
+export const state = () => ({
+ loading: false,
+});
+
+export const getters = {
+ animation: (state) => {
+ return state.loading ? "animate-none" : "animate-spin";
+ },
+};
+export const mutations = {
+ loadingStatus: (state, value) => {
+ state.loading = value;
+ },
+};