Update product slider

This commit is contained in:
marzban-dev
2025-05-03 23:30:10 +03:30
parent 7e90997d4d
commit 7a569869d9
@@ -3,12 +3,12 @@
import { Swiper, SwiperSlide } from "swiper/vue";
import type { SwiperClass } from "swiper/react";
import useHomeData from "~/composables/api/home/useHomeData";
// types
type Props = {
title: string;
products: ProductListItem[];
};
// props
@@ -17,14 +17,8 @@ defineProps<Props>();
// state
const { data: homeData, suspense } = useHomeData();
const swiper_instance = ref<SwiperClass | null>(null);
// queries
await suspense();
// methods
const onSwiper = (swiper: SwiperClass) => {
@@ -100,7 +94,7 @@ const onSwiper = (swiper: SwiperClass) => {
}"
>
<SwiperSlide
v-for="product in [...homeData!.products,...homeData!.products]"
v-for="product in products"
:key="product.id"
>
<ProductCard