From 5e89ad0836ca38b132d1748603be7d8593b9bcb2 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 12 Nov 2022 17:14:40 +0100 Subject: Add signup page --- app/src/store/index.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 app/src/store/index.ts (limited to 'app/src/store/index.ts') diff --git a/app/src/store/index.ts b/app/src/store/index.ts new file mode 100644 index 0000000..6001d90 --- /dev/null +++ b/app/src/store/index.ts @@ -0,0 +1,27 @@ +import { createStore } from "vuex"; +import auth from "./modules/auth"; +import { toastController } from "@ionic/vue"; + +const store = createStore({ + state: { + api: process.env.VUE_APP_BACKEND_URL, + }, + actions: { + // eslint-disable-next-line + async toast({ commit }, data: any) { + const toast = await toastController.create({ + header: data.header, + message: data.text, + color: data.color, + duration: 2000, + position: "top", + }); + return toast.present(); + }, + }, + modules: { + auth, + }, +}); + +export default store; -- cgit v1.2.3-18-g5258