WeCare.js
1.64 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
import React from "react";
import { Col, Row } from "react-bootstrap";
import Heading from "@/components/Heading";
import Image from "next/image";
import { cleanImage } from "../services/imageHandling";
const WeCare = ({weCareData}) => {
return (
<section className=" we-care-section sec_padd">
<div className="custom_containers container">
{weCareData?.map((item, index) => {
const isEven = index % 2 === 0;
return (
<Row
className="mb-5 align-items-center justify-content-center"
key={index}
>
<Col
md={7}
className={`mb-4 ${isEven ? "order-md-1" : "order-md-2"}`}
>
<div className="img-banner">
<Image
width={868}
height={629}
src={cleanImage(item?.image?.url)}
alt={item?.title}
className="img-fluid"
/>
</div>
</Col>
<Col md={5} className={`${isEven ? "order-md-2" : "order-md-1"}`}>
<div
className="title"
dangerouslySetInnerHTML={{ __html: item?.title }}
></div>
<div
className="info"
dangerouslySetInnerHTML={{
__html: item?.description || "",
}}
/>
</Col>
</Row>
);
})}
</div>
</section>
);
};
export default WeCare;