<script lang="ts" setup>

// import

import useHomeData from "~/composables/api/home/useHomeData";

// state

const { suspense } = useHomeData();

// ssr

const response = await suspense();

if (response.isError) {
    throw createError({
        statusCode: 500,
        statusMessage: `Landing error : ${response.error.message}`
    });
}

</script>

<template>
    <div class="w-full">
<!--        <LoadingOverlay />-->
        <Hero />
        <Preview />
        <ProductsShowcase />
        <ProductsSlider title="محصولات پرفروش" />
        <Categories />
        <Brands />
        <MostRecentComments />
        <LatestStories />
    </div>
</template>