Working and clean fucking guestbook

This commit is contained in:
2021-08-20 11:58:44 +02:00
parent 28990e0151
commit 2f50ad9d55
20 changed files with 103 additions and 530 deletions

View File

@@ -2,17 +2,20 @@ import {GetterTree, MutationTree} from "vuex";
export const state = () => ({
opened: false,
route: '/'
route: '/',
email: ''
})
export type RootState = ReturnType<typeof state>
export const getters: GetterTree<RootState, RootState> = {
opened: state => state.opened,
route: state => state.route
route: state => state.route,
email: state => state.email
}
export const mutations: MutationTree<RootState> = {
TOGGLE_OPENED: (state, opened: boolean) => (state.opened = opened),
SET_ROUTE: (state, route: string) => (state.route = route)
SET_ROUTE: (state, route: string) => (state.route = route),
SET_EMAIL: (state, email: string) => (state.email = email)
}