InnerBannerBrands.js
3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import { Swiper, SwiperSlide } from "swiper/react";
import "swiper/css";
import "swiper/css/navigation";
import "swiper/css/pagination";
import { Navigation, Pagination, Autoplay } from "swiper/modules";
import SwiperBtn from "@/components/Layout/SwiperBtn";
import { cleanImage } from "../services/imageHandling";
import Heading from "@/components/Heading";
import Image from "next/image";
import React from "react";
const InnerBannerBrands = ({data}) => {
// return (
// <>
// <section className='innerbanner-section'>
// <div className='innerbanner product-details'>
// <Row>
// <Col>
// <div className='product-banner'>
// <Image width={1920} height={948} src={data?.image?.url} alt="" />
// <div className='info'>
// <Heading el="h2" heading={data?.title} />
// <div dangerouslySetInnerHTML={{__html: data?.description}}></div>
// </div>
// </div>
// </Col>
// </Row>
// </div>
// </section>
// </>
// )
return (
<>
<section className="innerbanner-section">
<div className="innerbanner product-details">
<div className="product-banner">
<div className="position-relative">
<Swiper
navigation={{
nextEl: ".cust-swiper-button-next",
prevEl: ".cust-swiper-button-prev",
}}
pagination={{ clickable: true }}
autoplay={{ delay: 5000, disableOnInteraction: false }}
loop={false}
modules={[Navigation, Pagination, Autoplay]}
className="homeBannerSwiper"
>
{data?.image?.map((item, index) => (
<SwiperSlide key={index}>
<Image
width={1856}
height={1086}
src={item?.url}
alt=""
/>
</SwiperSlide>
))}
</Swiper>
{/* Navigation buttons outside Swiper - hidden if only 1 image */}
{data?.image?.length > 1 && (
<div className="position-absolute swiperbtn1 d-lg-flex d-none justify-content-md-between wrapper-full align-items-center w-100">
<SwiperBtn />
</div>
)}
</div>
<div className="info">
<Heading el="h2" heading={data?.title} />
<div
dangerouslySetInnerHTML={{
__html: data?.description,
}}
></div>
</div>
</div>
</div>
</section>
</>
);
}
export default InnerBannerBrands