diff --git a/src/components/ExperiencesCard.tsx b/src/components/ExperiencesCard.tsx new file mode 100644 index 0000000..e332d50 --- /dev/null +++ b/src/components/ExperiencesCard.tsx @@ -0,0 +1,101 @@ +import React, { FC } from "react"; +import GallerySlider from "@/components/GallerySlider"; +import { DEMO_EXPERIENCES_LISTINGS } from "@/data/listings"; +import { ExperiencesDataType } from "@/data/types"; +import StartRating from "@/components/StartRating"; +import BtnLikeIcon from "@/components/BtnLikeIcon"; +import SaleOffBadge from "@/components/SaleOffBadge"; +import Badge from "@/shared/Badge"; +import Link from "next/link"; +import { MapPinIcon } from "@heroicons/react/24/outline"; + +export interface ExperiencesCardProps { + className?: string; + ratioClass?: string; + data?: ExperiencesDataType; + size?: "default" | "small"; +} + +const DEMO_DATA: ExperiencesDataType = DEMO_EXPERIENCES_LISTINGS[0]; + +const ExperiencesCard: FC = ({ + size = "default", + className = "", + data = DEMO_DATA, + ratioClass = "aspect-w-3 aspect-h-3", +}) => { + const { + galleryImgs, + address, + title, + href, + like, + saleOff, + isAds, + price, + reviewStart, + reviewCount, + id, + } = data; + + const renderSliderGallery = () => { + return ( +
+ + + {saleOff && } +
+ ); + }; + + const renderContent = () => { + return ( +
+
+
+ {size === "default" && } + {address} +
+ +
+ {isAds && } +

+ {title} +

+
+
+
+
+ + {price} + {` `} + {size === "default" && ( + + /person + + )} + + +
+
+ ); + }; + + return ( +
+ {renderSliderGallery()} + {renderContent()} +
+ ); +}; + +export default ExperiencesCard;