Background.js
1.65 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, Container, Row } from "react-bootstrap";
import Heading from "@/components/reuseables/Heading";
import { motion } from "framer-motion";
import { slideFromLeft } from "@/components/reuseables/variants";
import { fadeIn } from "@/components/reuseables/variants";
import Image from "next/image";
import { cleanImage } from "@/layout/imageHandling";
const Background = ({ introdeatils }) => {
console.log("title", introdeatils[0]?.Title);
return (
<>
<section className="pt-100 pb-100">
<Container>
<Row className="align-items-center">
<Col lg={7}>
<div className="corpedia-details">
{introdeatils[0]?.Title && (
<Heading
el="h2"
heading={introdeatils[0]?.Title}
className="h2"
/>
)}
{introdeatils[0]?.Description && (
<p>{introdeatils[0]?.Description}</p>
)}
</div>
</Col>
<Col lg={5}>
<div className="corpedia-details">
<motion.div
variants={fadeIn(0.4)}
initial={"hidden"}
whileInView={"show"}
viewport={{ once: false, amount: 0.2 }}
>
<Image
src={cleanImage(introdeatils[0]?.Image?.url)}
layout="fill"
className="img-fluid image"
alt="image"
/>
</motion.div>
</div>
</Col>
</Row>
</Container>
</section>
</>
);
};
export default Background;