dynamize projects

This commit is contained in:
isUnknown 2024-09-04 11:28:12 +02:00
parent 3f9c8bbebf
commit edd9e66efb
10 changed files with 417 additions and 291 deletions

View file

@ -0,0 +1,24 @@
<template>
<template v-if="data">
<Tabs :projects="data.children" @update:currentTab="changeTab" />
<TabPanel :projects="data.children" :currentTab="currentTab" />
</template>
</template>
<script setup>
import Tabs from "./Tabs.vue";
import TabPanel from "./TabPanel.vue";
import { useApiStore } from "../stores/api";
import { ref } from "vue";
const data = ref(null);
const currentTab = ref("current");
const api = useApiStore();
api.fetchPageData("projects").then((res) => (data.value = res));
function changeTab(newValue) {
currentTab.value = newValue;
}
</script>
<style scoped></style>