Updated
This commit is contained in:
@@ -1,6 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
<script lang="ts" setup>
|
||||
|
||||
import Categories from "~/components/home/Categories.vue";
|
||||
// import
|
||||
|
||||
import useHomeData from "~/composables/api/home/useHomeData";
|
||||
|
||||
// state
|
||||
|
||||
const { suspense } = useHomeData();
|
||||
|
||||
// lifecycle
|
||||
|
||||
onServerPrefetch(async () => {
|
||||
const response = await suspense();
|
||||
|
||||
if (response.isError) {
|
||||
throw createError({
|
||||
statusCode: 500,
|
||||
statusMessage: `Landing error : ${response.error.message}`,
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -9,9 +28,8 @@ import Categories from "~/components/home/Categories.vue";
|
||||
<Hero />
|
||||
<Preview />
|
||||
<Categories />
|
||||
<ProductsSlider title="یک عنوان تستی" />
|
||||
<ProductsSlider title="محصولات پرفروش" />
|
||||
<Brands />
|
||||
<!-- <ProductHero />-->
|
||||
<MostRecentComments />
|
||||
<LatestStories />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user