Corpedia.js 4.55 KB
import React from "react";
import Link from "next/link";
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 Image from "next/image";
import { cleanImage } from "@/layout/imageHandling";

// const services = [
//   {
//     id: 1,
//     serviceTitle: "Karnataka Compulsory Gratuity Insurance Rules, 2024",
//     serviceShortDescription:
//       "Gratuity is a monetary compensation payable by an employer to employees who have rendered 5 or more years of continuous service to an organization and retires or quits the organization",
//     serviceDetailsUrl: "/images/knoweledge/pdf/corpedia/Karnataka_Compulsory_Gratuity_Insurance_Rules,_2024.pdf",
//     date: "15 Feb 2024",
//   },
//   {
//     id: 2,
//     serviceTitle: "Recent amendment in Companies and LLP Act in India",
//     serviceShortDescription:
//       "Recently, the Ministry of Corporate Affairs came out with certain amendments concerning dematerilisation of shares of private limited companies, the issue of warrants by companies, certain administrative matters, and additional compliances applicable to Limited Liability Partnerships (LLP).",
//     serviceDetailsUrl: "/images/knoweledge/pdf/corpedia/Recent_amendment_in_Companies_and_LLP_Act_in_India.pdf",
//     date: "16 Nov 2023",
//   },
//   {
//     id: 3,
//     serviceTitle: "Recent Amendments relating to Accounts and Audit under Companies Act, 2013",
//     serviceShortDescription:
//       "Recently, the Ministry of Corporate Affairs came out with certain amendments which impact the maintenance of accounts, reporting and preparation of financial statements.",
//     serviceDetailsUrl: "/images/knoweledge/pdf/corpedia/Recent_Amendments_relating_to_Accounts_and_Audit_under_Companies_Act,_2013.pdf",
//     date: "18 Aug 2021",
//   },
// ];

const Corpedia = ({Corpedia, corpedialist}) => {
  // console.log(corpedialist,"corpedialist")
  const corpedialistlatest = corpedialist.slice(0, 3);

  
  return (
    <>
      <div className="corpedia-area pt-70 pb-100 bg-light">
        <Container>
          <Row>
            <Col lg={8} md={8} sm={12}>
              <div className="text-align-left">
                
                <Heading heading={Corpedia?.Title} el="h2" />

                <p className="mb-lg-5 mb-3">
                {Corpedia?.Description}
                </p>
              </div>
            </Col>
            <Col
              lg={4}
              md={4}
              sm={12}
              className="d-flex align-self-center justify-content-start justify-content-lg-end mb-5 mb-lg-0"
            >
              <Link href="/corpedia" className="default-btn-two">
                Load More <i className="ri-arrow-right-line"></i>
              </Link>
            </Col>
          </Row>

          <Row className="align-items-center">
            {corpedialistlatest &&
              corpedialistlatest?.map((service, index) => (
                <Col lg={4} md={6} sm={12} key={service.id}>
                  <motion.div
                    variants={slideFromLeft(index * 0.5)}
                    initial={"hidden"}
                    whileInView={"show"}
                    viewport={{ once: false, amount: 0.4 }}
                  >
                    <div className="services-box-budget">
                      <div className="d-flex align-items-center">
                        <Image
                          src={cleanImage(service?.Image?.url)}
                          alt={service?.alternativeText ? service?.alternativeText : "image"}
                          width={40}
                          height={40}
                          className="img-fluid me-3"
                        />
                        <h3>
                          <Link href={`/corpedia/${service?.slug ? service?.slug : "#"}`}>
                            {service.Title}
                          </Link>
                        </h3>
                      </div>

                      <p>{service.Description}</p>

                      <Link href={`/corpedia/${service?.slug ? service?.slug : "#"}`}
                        className="default-btn" target="_blank"
                      >
                        Read More
                        <i className="ri-arrow-right-line"></i>
                      </Link>
                    </div>
                  </motion.div>
                </Col>
              ))}
          </Row>
        </Container>
      </div>
    </>
  );
};

export default Corpedia;