<template>
  <div class="homepage">
    <homepage-carousel :homepage-data="data" :pending="pending" />
    <homepage-product-section :homepage-data="data" :pending="pending" />
    <homepage-solution-section :homepage-data="data" :pending="pending" />
  </div>
</template>

<script setup lang="ts">
  const { data, pending, error } = await useHomepage();

  const pageTilte = $t('page-title.homepage');

  watch(error, (value) => {
    if (value) {
      logger.error('数据获取失败: ', value);
    }
  });

  useSeoMeta({
    title: pageTilte,
    description: $t('company-description'),
  });
</script>
