<template>
    <div>
      <KeepAlive>
        <component :is="component.componentInstance" v-for="component in componentsList" :key="component.name" :component="component.component" />
      </KeepAlive>
    </div>
  </template>
  
  <script setup>
  import { useStore } from "@/stores/store";
  const route = useRoute();
  const store = useStore();
  const menuStore = useMenuStore();
  await store.getSections(route.params.id);
  
  onMounted(() => {
    menuStore.openMenu = false;
  });
  
  useHead(menuStore.headMeta);

  const componentsList = await store.getComponents(route.params.id);
</script>
  