diff --git a/src/components/StayCardH.tsx b/src/components/StayCardH.tsx new file mode 100644 index 0000000..ce31758 --- /dev/null +++ b/src/components/StayCardH.tsx @@ -0,0 +1,147 @@ +import React, { FC } from "react"; +import GallerySlider from "@/components/GallerySlider"; +import { DEMO_STAY_LISTINGS } from "@/data/listings"; +import { StayDataType } 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"; + +export interface StayCardHProps { + className?: string; + data?: StayDataType; +} + +const DEMO_DATA = DEMO_STAY_LISTINGS[0]; + +const StayCardH: FC = ({ + className = "", + data = DEMO_DATA, +}) => { + const { + galleryImgs, + listingCategory, + address, + title, + href, + like, + saleOff, + isAds, + price, + reviewStart, + reviewCount, + id, + } = data; + + const renderSliderGallery = () => { + return ( +
+ + + {saleOff && } +
+ ); + }; + + const renderTienIch = () => { + return ( +
+
+
+ + + 6 guests + +
+
+ + + 6 beds + +
+
+
+
+ + + 3 baths + +
+
+ + + No smoking + +
+
+
+
+ + + 6 bedrooms + +
+
+ + + Wifi + +
+
+
+ ); + }; + + const renderContent = () => { + return ( +
+
+
+ + {listingCategory.name} in {address} + +
+
+ {isAds && } +

+ {title} +

+
+
+
+ {renderTienIch()} +
+
+ + + {price} + {` `} + + /night + + +
+
+ ); + }; + + return ( +
+ +
+ {renderSliderGallery()} + {renderContent()} +
+
+ ); +}; + +export default StayCardH;