feat: اضافه کردن قابلیت کلیک روی تصاویر carousel و banners برای هدایت به لینک مربوطه

This commit is contained in:
hamid zarghami
2025-10-16 10:05:12 +03:30
parent 80b7c761a9
commit 0a3b819a7e
4 changed files with 36 additions and 13 deletions
+4 -1
View File
@@ -32,7 +32,10 @@ const Carousel: FC = () => {
<Swiper pagination={true} modules={[Pagination]} className="mySwiper pb-5" style={{ zIndex: 0, position: 'relative' }}>
{sliders.map((slider) => (
<SwiperSlide key={slider._id}>
<div className='h-[200px] sm:h-[300px] md:h-[400px] relative'>
<div
className='h-[200px] sm:h-[300px] md:h-[400px] relative cursor-pointer'
onClick={() => slider.linkUrl && window.open(slider.linkUrl, '_blank')}
>
<Image
src={slider.imageUrl}
alt={slider.altText}