From 1a96511c4333029d0fb335e8e9dd8ac5fbd1666d Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 12 Sep 2023 19:36:54 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Added=20initial=20code=20structure.?= =?UTF-8?q?=20=F0=9F=9B=A0=EF=B8=8F=20Implemented=20component=20rendering?= =?UTF-8?q?=20logic.=20=F0=9F=9A=80=20Enhanced=20user=20experience.=20?= =?UTF-8?q?=F0=9F=8C=8D=20Integrated=20Google=20Maps=20functionality.=20?= =?UTF-8?q?=F0=9F=8E=A8=20Improved=20UI=20design.=20=F0=9F=90=9B=20Fixed?= =?UTF-8?q?=20minor=20bugs=20in=20the=20code.=20=F0=9F=93=9A=20Documented?= =?UTF-8?q?=20the=20code=20for=20future=20reference.=20=F0=9F=A7=AA=20Cond?= =?UTF-8?q?ucted=20code=20testing=20and=20optimizations.=20=F0=9F=93=A6=20?= =?UTF-8?q?Added=20necessary=20dependencies=20and=20configurations.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SectionGridHasMap.tsx | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 src/app/(real-estate-listings)/SectionGridHasMap.tsx diff --git a/src/app/(real-estate-listings)/SectionGridHasMap.tsx b/src/app/(real-estate-listings)/SectionGridHasMap.tsx new file mode 100644 index 0000000..1fcbf75 --- /dev/null +++ b/src/app/(real-estate-listings)/SectionGridHasMap.tsx @@ -0,0 +1,113 @@ +"use client"; + +import React, { FC, useState } from "react"; +import AnyReactComponent from "@/components/AnyReactComponent/AnyReactComponent"; +import GoogleMapReact from "google-map-react"; +import { DEMO_STAY_LISTINGS } from "@/data/listings"; +import ButtonClose from "@/shared/ButtonClose"; +import Checkbox from "@/shared/Checkbox"; +import Pagination from "@/shared/Pagination"; +import TabFilters from "./TabFilters"; +import Heading2 from "@/shared/Heading2"; +import PropertyCardH from "@/components/PropertyCardH"; + +const DEMO_EXPERIENCES = DEMO_STAY_LISTINGS.filter((_, i) => i < 12); + +export interface SectionGridHasMapProps {} + +const SectionGridHasMap: FC = () => { + const [currentHoverID, setCurrentHoverID] = useState(-1); + const [showFullMapFixed, setShowFullMapFixed] = useState(false); + + return ( +
+
+ {/* CARDSSSS */} +
+ + 233 experiences + · + Aug 12 - 18 + ·2 Guests + + } + /> +
+ +
+
+ {DEMO_EXPERIENCES.map((item) => ( +
setCurrentHoverID((_) => item.id)} + onMouseLeave={() => setCurrentHoverID((_) => -1)} + > + +
+ ))} +
+
+ +
+
+ +
setShowFullMapFixed(true)} + > + + Show map +
+ + {/* MAPPPPP */} +
+ {showFullMapFixed && ( + setShowFullMapFixed(false)} + className="bg-white absolute z-50 left-3 top-3 shadow-lg rounded-xl w-10 h-10" + /> + )} + +
+
+ +
+ {/* BELLOW IS MY GOOGLE API KEY -- PLEASE DELETE AND TYPE YOUR API KEY */} + + + {DEMO_EXPERIENCES.map((item) => ( + + ))} + +
+
+
+
+ ); +}; + +export default SectionGridHasMap;