MyWhishList.js 5.17 KB
import Image from "next/image";
import React, { Fragment } from "react";
import { Button } from "react-bootstrap";
import { renderImage } from "../../services/imageHandling";

const MyWhishList = () => {
    const whishListData = [
        {
            id: "0",
            name: "City Climb",
            description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
            price: "$200",
            discount: "40% OFF",
            availablity: "For 1 Night",
            other: "Includes taxes & Fees",
            rating: "8.8",
            type: "Top Rated",
            image: "/images/user/image1.png"
        },
        {
            id: "1",
            name: "City Climb",
            description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
            price: "$200",
            discount: "40% OFF",
            availablity: "For 1 Night",
            other: "Includes taxes & Fees",
            rating: "8.8",
            type: "Top Rated",
            image: "/images/user/image2.png"
        },
        {
            id: "2",
            name: "City Climb",
            description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
            price: "$200",
            discount: "40% OFF",
            availablity: "For 1 Night",
            other: "Includes taxes & Fees",
            rating: "8.8",
            type: "Top Rated",
            image: "/images/user/image3.png"
        },
        {
            id: "3",
            name: "City Climb",
            description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
            price: "$200",
            discount: "40% OFF",
            availablity: "For 1 Night",
            other: "Includes taxes & Fees",
            rating: "8.8",
            type: "Top Rated",
            image: "/images/user/image4.png"
        }
    ]

    return (
        <Fragment>
            <div className="container">
                <div className="row">
                    <div className="col-12 col-lg-12 form-container content-wraaper">
                        <h2>My Bookings</h2>
                        <div className="row">
                            {whishListData?.length && whishListData.map((data, index) => (
                                <div className="col-12 col-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>
                                            <p className="type">{data.type}</p>
                                        </div>
                                        <div className="card-booking-content">
                                            <div className="d-flex align-items-start justify-content-between">
                                                <p className="activity-name">{data.name}</p>
                                                <div className="d-flex align-items-center">
                                                    <div className="rating">
                                                        <span className="me-1 pt-1">{data.rating}</span>
                                                        <span className="image-container">
                                                            <Image src={renderImage("/images/user/star.svg")} layout="fill" className="image" />
                                                        </span>
                                                    </div>

                                                    <span className="image-container">
                                                        <Image src={renderImage("/images/user/heart.svg")} layout="fill" className="image" />
                                                    </span>
                                                </div>
                                            </div>

                                            <p className="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit, <span>Read More</span></p>
                                            <p className="price">{data.price} <span>{data.discount}</span></p>
                                            <p className="other">{data.availablity}</p>
                                            <p className="other">{data.other}</p>
                                        </div>
                                        <div className="card-booking-footer pt-0">
                                            <Button id="exploreNow" aria-label="Explore Now" type="button" className="btn btn-primary btn-explore">
                                                Explore Now
                                            </Button>
                                        </div>
                                    </div>
                                </div>
                            ))}
                        </div>
                    </div>
                </div>
            </div>
        </Fragment>
    )
}

export default MyWhishList;