2024-09-04 11:28:12 +02:00
|
|
|
<template>
|
2024-09-04 19:10:21 +02:00
|
|
|
<h2 id="tabslist" class="sr-only">Projets</h2>
|
2024-09-04 11:28:12 +02:00
|
|
|
<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>
|