diff --git a/src/components/PropertyCardH.tsx b/src/components/PropertyCardH.tsx new file mode 100644 index 0000000..dc26485 --- /dev/null +++ b/src/components/PropertyCardH.tsx @@ -0,0 +1,148 @@ +import React, { FC } from "react"; +import GallerySlider from "@/components/GallerySlider"; +import { DEMO_STAY_LISTINGS } from "@/data/listings"; +import StartRating from "@/components/StartRating"; +import BtnLikeIcon from "@/components/BtnLikeIcon"; +import SaleOffBadge from "@/components/SaleOffBadge"; +import Badge from "@/shared/Badge"; +import { StayDataType } from "@/data/types"; +import Link from "next/link"; + +export interface PropertyCardHProps { + className?: string; + data?: StayDataType; +} + +const DEMO_DATA = DEMO_STAY_LISTINGS[0]; + +const PropertyCardH: FC = ({ + className = "", + data = DEMO_DATA, +}) => { + const { + galleryImgs, + title, + href, + like, + saleOff, + isAds, + price, + reviewStart, + reviewCount, + id, + } = data; + + const renderSliderGallery = () => { + return ( +
+ + + {saleOff && ( + + )} +
+ ); + }; + + const renderTienIch = () => { + return ( +
+
+ + + + + 6 beds + +
+ + {/* ---- */} +
+ + + + + 3 baths + +
+ + {/* ---- */} +
+ + + + + 1200 Sq. Fit + +
+
+ ); + }; + + const renderContent = () => { + return ( +
+
+
+ + + 4 Network +
+ } + /> + + + Family +
+ } + color="yellow" + /> +
+
+ {isAds && } +

+ {title} +

+
+ {renderTienIch()} +
+
+ + + {`${price},000`} + +
+ + + ); + }; + + return ( +
+ +
+ {renderSliderGallery()} + {renderContent()} +
+ +
+ ); +}; + +export default PropertyCardH;