mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-15 04:29:37 +01:00
Working hardly
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
import {GetterTree, MutationTree} from "vuex";
|
||||
|
||||
export const state = () => ({
|
||||
opened: false
|
||||
opened: false,
|
||||
route: '/'
|
||||
})
|
||||
|
||||
export type RootState = ReturnType<typeof state>
|
||||
|
||||
export const getters: GetterTree<RootState, RootState> = {
|
||||
opened: state => state.opened,
|
||||
route: state => state.route
|
||||
}
|
||||
|
||||
export const mutations: MutationTree<RootState> = {
|
||||
TOGGLE_OPENED: (state, opened: boolean) => (state.opened = opened),
|
||||
SET_ROUTE: (state, route: string) => (state.route = route)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user