MyEnquires.js 8.81 KB
import Image from "next/image";
import React, { Fragment } from "react";
import { renderImage } from "../../services/imageHandling";

const MyEnquires = () => {
    const bookingsData = [
        {
            id: "0",
            name: "City Climb",
            start_date: "Jan 8, 2021",
            end_date: "Jan 9, 2021",
            price: "$200",
            status: "Confirmed",
            image: "/images/user/image1.png"
        },
        {
            id: "1",
            name: "City Climb",
            start_date: "Jan 8, 2021",
            end_date: "Jan 9, 2021",
            price: "$200",
            status: "Confirmed",
            image: "/images/user/image1.png"
        },
        {
            id: "2",
            name: "City Climb",
            start_date: "Jan 8, 2021",
            end_date: "Jan 9, 2021",
            price: "$200",
            status: "Confirmed",
            image: "/images/user/image1.png"
        },
        {
            id: "3",
            name: "City Climb",
            start_date: "Jan 8, 2021",
            end_date: "Jan 9, 2021",
            price: "$200",
            status: "Confirmed",
            image: "/images/user/image1.png"
        }
    ]

    return (
        <Fragment>
            <div className="container">
                <div className="row">
                    <div className="col-12 col-lg-12 form-container content-wraaper">
                        <h2 className="px-2 px-lg-0">My Enquires</h2>
                        <div className="row">
                            {bookingsData?.length && bookingsData.map((data, index) => (
                                <div className="col-12 col-sm-12 col-lg-3 col-md-6 px-4 px-lg-3" key={`1${index}`}>
                                    <div className="card-booking">
                                        <div className="card-booking-img">
                                            <span className="image-container">
                                                <Image src={renderImage(data.image)} layout="fill" className="image" />
                                            </span>
                                        </div>
                                        <div className="card-booking-content">
                                            <p className="activity-name">{data.name}</p>
                                            <p>{data.start_date} - {data.end_date}</p>
                                            <p>{data.price}</p>
                                            <p className="status">{data.status}</p>
                                        </div>
                                        <div className="hr-div" />
                                        <div className="card-booking-footer">
                                            <div className="d-flex align-items-center justify-content-between">
                                                <div className="d-flex align-items-center">
                                                    <span className="image-container me-2">
                                                        <Image src={renderImage("/images/user/icon-rebook.svg")} layout="fill" className="image" />
                                                    </span>
                                                    <p className="duration mb-0">Rebook this booking</p>
                                                </div>
                                                <div className="image-container">
                                                    <Image src={renderImage("/images/user/arrow-right.svg")} layout="fill" className="image" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            ))}
                        </div>
                        <div className="row">
                            {bookingsData?.length && bookingsData.map((data, index) => (
                                <div className="col-12 col-sm-12 col-lg-3 col-md-6 px-4 px-lg-3" key={`2${index}`}>
                                    <div className="card-booking">
                                        <div className="card-booking-img">
                                            <span className="image-container">
                                                <Image src={renderImage(data.image)} layout="fill" className="image" />
                                            </span>
                                        </div>
                                        <div className="card-booking-content">
                                            <p className="activity-name">{data.name}</p>
                                            <p>{data.start_date} - {data.end_date}</p>
                                            <p>{data.price}</p>
                                            <p className="status">{data.status}</p>
                                        </div>
                                        <div className="hr-div" />
                                        <div className="card-booking-footer">
                                            <div className="d-flex align-items-center justify-content-between">
                                                <div className="d-flex align-items-center">
                                                    <span className="image-container me-2">
                                                        <Image src={renderImage("/images/user/icon-rebook.svg")} layout="fill" className="image" />
                                                    </span>
                                                    <p className="duration mb-0">Rebook this booking</p>
                                                </div>
                                                <div className="image-container">
                                                    <Image src={renderImage("/images/user/arrow-right.svg")} layout="fill" className="image" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            ))}
                        </div>
                        <div className="row">
                            {bookingsData?.length && bookingsData.map((data, index) => (
                                <div className="col-12 col-sm-12 col-lg-3 col-md-6 px-4 px-lg-3" key={`3${index}`}>
                                    <div className="card-booking">
                                        <div className="card-booking-img">
                                            <span className="image-container">
                                                <Image src={renderImage(data.image)} layout="fill" className="image" />
                                            </span>
                                        </div>
                                        <div className="card-booking-content">
                                            <p className="activity-name">{data.name}</p>
                                            <p>{data.start_date} - {data.end_date}</p>
                                            <p>{data.price}</p>
                                            <p className="status">{data.status}</p>
                                        </div>
                                        <div className="hr-div" />
                                        <div className="card-booking-footer">
                                            <div className="d-flex align-items-center justify-content-between">
                                                <div className="d-flex align-items-center">
                                                    <span className="image-container me-2">
                                                        <Image src={renderImage("/images/user/icon-rebook.svg")} layout="fill" className="image" />
                                                    </span>
                                                    <p className="duration mb-0">Rebook this booking</p>
                                                </div>
                                                <div className="image-container">
                                                    <Image src={renderImage("/images/user/arrow-right.svg")} layout="fill" className="image" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            ))}
                        </div>
                    </div>
                </div>
            </div>
        </Fragment>
    )
}

export default MyEnquires;