From 961aceb727227a73859414070e3cc1b09d2281b0 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 14 Sep 2022 18:29:25 +0200 Subject: Add store --- store/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 store/index.js (limited to 'store/index.js') 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; + }, +}; -- cgit v1.2.3-18-g5258