forgot to add new plugin

This commit is contained in:
2024-02-14 09:39:35 +01:00
parent 2ced6f82d1
commit e900ff4777
3 changed files with 40 additions and 26 deletions

19
plugins/vuex.js Normal file
View File

@ -0,0 +1,19 @@
import { createStore } from "vuex";
const store = createStore({
state() {
return {
assetEditable: false,
};
},
mutations: {
toggleEditableAsset(state) {
state.assetEditable = !state.assetEditable
},
},
});
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(store);
// Install the store instance as a plugin
});