diff --git a/src/stores/tabs.js b/src/stores/tabs.js new file mode 100644 index 00000000..2cd79067 --- /dev/null +++ b/src/stores/tabs.js @@ -0,0 +1,21 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; + +const tablist = { + home: "home", + search: "search", + queue: "queue", +}; + +export default defineStore("tabs", { + state: () => ({ + tabs: tablist, + current: tablist.home, + }), + actions: { + changeTab(tab) { + this.current = tab; + console.log(this.current); + }, + }, +});