diff --git a/client/package.json b/client/package.json index c87c830..9f8052f 100644 --- a/client/package.json +++ b/client/package.json @@ -16,6 +16,7 @@ "@uidotdev/usehooks": "^2.4.1", "gsap": "^3.12.5", "ky": "^1.3.0", + "lodash": "^4.17.21", "react": "^18.2.0", "react-device-detect": "^2.2.3", "react-dom": "^18.2.0", @@ -31,6 +32,7 @@ "zustand": "^4.5.2" }, "devDependencies": { + "@types/lodash": "^4.17.7", "@types/node": "^20.14.8", "@types/react": "^18.2.66", "@types/react-dom": "^18.2.22", diff --git a/client/public/ROVE_MAIN_BROCHURE.pdf b/client/public/ROVE_MAIN_BROCHURE.pdf new file mode 100644 index 0000000..0a6744b Binary files /dev/null and b/client/public/ROVE_MAIN_BROCHURE.pdf differ diff --git a/client/public/images/layouts/1br_b_left.png b/client/public/images/layouts/1br_b_left.png new file mode 100644 index 0000000..56083e8 Binary files /dev/null and b/client/public/images/layouts/1br_b_left.png differ diff --git a/client/public/images/layouts/1br_d_left.png b/client/public/images/layouts/1br_d_left.png new file mode 100644 index 0000000..1e52512 Binary files /dev/null and b/client/public/images/layouts/1br_d_left.png differ diff --git a/client/public/images/unitTypes/withLegend/1br-type-a-left.png b/client/public/images/unitTypes/withLegend/1br-type-a-left.png new file mode 100644 index 0000000..668ca46 Binary files /dev/null and b/client/public/images/unitTypes/withLegend/1br-type-a-left.png differ diff --git a/client/public/images/unitTypes/withLegend/1br-type-a-right.png b/client/public/images/unitTypes/withLegend/1br-type-a-right.png new file mode 100644 index 0000000..e8b00a3 Binary files /dev/null and b/client/public/images/unitTypes/withLegend/1br-type-a-right.png differ diff --git a/client/public/images/unitTypes/withLegend/1br-type-b-left.png b/client/public/images/unitTypes/withLegend/1br-type-b-left.png new file mode 100644 index 0000000..d3d1d68 Binary files /dev/null and b/client/public/images/unitTypes/withLegend/1br-type-b-left.png differ diff --git a/client/public/images/unitTypes/withLegend/1br-type-b-right.png b/client/public/images/unitTypes/withLegend/1br-type-b-right.png new file mode 100644 index 0000000..c5222e7 Binary files /dev/null and b/client/public/images/unitTypes/withLegend/1br-type-b-right.png differ diff --git a/client/public/images/unitTypes/withLegend/1br-type-c-left.png b/client/public/images/unitTypes/withLegend/1br-type-c-left.png new file mode 100644 index 0000000..d479fbb Binary files /dev/null and b/client/public/images/unitTypes/withLegend/1br-type-c-left.png differ diff --git a/client/public/images/unitTypes/withLegend/1br-type-c-right.png b/client/public/images/unitTypes/withLegend/1br-type-c-right.png new file mode 100644 index 0000000..8f7fdd9 Binary files /dev/null and b/client/public/images/unitTypes/withLegend/1br-type-c-right.png differ diff --git a/client/public/images/unitTypes/withLegend/1br-type-d-left.png b/client/public/images/unitTypes/withLegend/1br-type-d-left.png new file mode 100644 index 0000000..5a37963 Binary files /dev/null and b/client/public/images/unitTypes/withLegend/1br-type-d-left.png differ diff --git a/client/public/images/unitTypes/withLegend/1br-type-d-right.png b/client/public/images/unitTypes/withLegend/1br-type-d-right.png new file mode 100644 index 0000000..61720ea Binary files /dev/null and b/client/public/images/unitTypes/withLegend/1br-type-d-right.png differ diff --git a/client/public/images/unitTypes/withLegend/2br-type-a-left.png b/client/public/images/unitTypes/withLegend/2br-type-a-left.png new file mode 100644 index 0000000..a0b6c64 Binary files /dev/null and b/client/public/images/unitTypes/withLegend/2br-type-a-left.png differ diff --git a/client/public/images/unitTypes/withLegend/2br-type-a-right.png b/client/public/images/unitTypes/withLegend/2br-type-a-right.png new file mode 100644 index 0000000..737717d Binary files /dev/null and b/client/public/images/unitTypes/withLegend/2br-type-a-right.png differ diff --git a/client/public/images/unitTypes/withLegend/2br-type-b.png b/client/public/images/unitTypes/withLegend/2br-type-b.png new file mode 100644 index 0000000..c2be794 Binary files /dev/null and b/client/public/images/unitTypes/withLegend/2br-type-b.png differ diff --git a/client/public/images/unitTypes/withLegend/studio-2-left.png b/client/public/images/unitTypes/withLegend/studio-2-left.png new file mode 100644 index 0000000..7f327a9 Binary files /dev/null and b/client/public/images/unitTypes/withLegend/studio-2-left.png differ diff --git a/client/public/images/unitTypes/withLegend/studio-2-right.png b/client/public/images/unitTypes/withLegend/studio-2-right.png new file mode 100644 index 0000000..bb9baac Binary files /dev/null and b/client/public/images/unitTypes/withLegend/studio-2-right.png differ diff --git a/client/public/images/unitTypes/withLegend/studio-flex-left.png b/client/public/images/unitTypes/withLegend/studio-flex-left.png new file mode 100644 index 0000000..51ce780 Binary files /dev/null and b/client/public/images/unitTypes/withLegend/studio-flex-left.png differ diff --git a/client/public/images/unitTypes/withLegend/studio-flex-right.png b/client/public/images/unitTypes/withLegend/studio-flex-right.png new file mode 100644 index 0000000..59c0273 Binary files /dev/null and b/client/public/images/unitTypes/withLegend/studio-flex-right.png differ diff --git a/client/public/videos/SkyGarden.mp4 b/client/public/videos/SkyGarden.mp4 new file mode 100644 index 0000000..01eb0c8 Binary files /dev/null and b/client/public/videos/SkyGarden.mp4 differ diff --git a/client/src/components/UnitTypesPage/UnitTypeCard.tsx b/client/src/components/UnitTypesPage/UnitTypeCard.tsx new file mode 100644 index 0000000..92190f0 --- /dev/null +++ b/client/src/components/UnitTypesPage/UnitTypeCard.tsx @@ -0,0 +1,37 @@ +interface Props { + desc: string; + imageSrc: string; + onClick: () => void; +} + +function UnitTypeCard({ desc, imageSrc, onClick }: Props) { + return ( +
+
+
+

Rove Home Marasi Drive

+
+

East Wing

+
+

Floor 11-35

+
+
+ {/*
+ 234 units +
*/} +
+
+ +
+
+

{desc}

+ {/*

Unavailable

*/} +
+
+ ); +} + +export default UnitTypeCard; diff --git a/client/src/components/complexWingPage/FloorSidebar/EastWingFloorLayout.tsx b/client/src/components/complexWingPage/FloorSidebar/EastWingFloorLayout.tsx new file mode 100644 index 0000000..69052f4 --- /dev/null +++ b/client/src/components/complexWingPage/FloorSidebar/EastWingFloorLayout.tsx @@ -0,0 +1,1454 @@ +interface Props { + handleMouseEnter: (e: React.MouseEvent) => void; + handleMouseLeave: () => void; + handleClick: (e: React.MouseEvent) => void; +} + +function EastWingFloorLayout({ + handleMouseEnter, + handleMouseLeave, + handleClick, +}: Props) { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +} + +export default EastWingFloorLayout; diff --git a/client/src/components/complexWingPage/FloorSidebar/FloorSidebar.tsx b/client/src/components/complexWingPage/FloorSidebar/FloorSidebar.tsx index 100dca2..a35f394 100644 --- a/client/src/components/complexWingPage/FloorSidebar/FloorSidebar.tsx +++ b/client/src/components/complexWingPage/FloorSidebar/FloorSidebar.tsx @@ -1,10 +1,10 @@ import { useState, useEffect, useRef } from "react"; import { IDesctiptionFloor } from "../../../types/descriptionFloor"; import ApartmentDescription from "./ApartmentDescription"; -import EastWingHighlighting from "./EastWingHighlighting"; -import EastWingLayout from "./EastWingLayout"; -import WestWingHighlighting from "./WestWingHighlighting"; -import WestWingLayout from "./WestWingLayout"; +// import EastWingHighlighting from "./EastWingHighlighting"; +// import EastWingLayout from "./EastWingLayout"; +// import WestWingHighlighting from "./WestWingHighlighting"; +// import WestWingLayout from "./WestWingLayout"; import useModal from "../../../store/useModal"; import AboutComplexModal from "../../modals/AboutComplexModal"; import { IAparmentRes } from "../../../types/apartmentsRes"; @@ -13,6 +13,11 @@ import { IAparmentRes } from "../../../types/apartmentsRes"; import { apartmentsWithoutVirtualTour } from "../../../consts/apartmentsWithoutVirtualTour"; import { filterCurrentApartment } from "../../../calc/filterCurrentApartment"; import WestWingFloorLayout from "./WestWingFloorLayout"; +import WestWingBottomFloorLayout from "./WestWingBottomFloorLayout"; +import EastWingFloorLayout from "./EastWingFloorLayout"; +import Button from "../../Button"; +import CloseIcon from "../../icons/CloseIcon"; +import useWingSidebar from "../../../store/useWingSidebar"; interface IFloorSidebarProps { currentFloor: IDesctiptionFloor | null; @@ -36,6 +41,7 @@ const FloorSidebar = ({ const [apartments, setApartments] = useState([]); const { setModal } = useModal(); const descRef = useRef(null); + const { setIsSidebar } = useWingSidebar(); function handleMouseMove(e: MouseEvent) { const y = e.clientY - 80; @@ -148,52 +154,64 @@ const FloorSidebar = ({

{currentFloor?.wing}

-
-
{floorApartments.length} units
-
+ + diff --git a/client/src/components/icons/CloseIcon.tsx b/client/src/components/icons/CloseIcon.tsx new file mode 100644 index 0000000..8a39240 --- /dev/null +++ b/client/src/components/icons/CloseIcon.tsx @@ -0,0 +1,25 @@ +interface Props { + className?: string; +} + +function CloseIcon({ className }: Props) { + return ( + + + + ); +} + +export default CloseIcon; diff --git a/client/src/components/icons/activities/AmphitheatreIcon.tsx b/client/src/components/icons/activities/AmphitheatreIcon.tsx index 02b704a..a041cfa 100644 --- a/client/src/components/icons/activities/AmphitheatreIcon.tsx +++ b/client/src/components/icons/activities/AmphitheatreIcon.tsx @@ -2,8 +2,8 @@ const AmphitheatreIcon = () => { return ( diff --git a/client/src/components/icons/activities/BoulderingWallIcon.tsx b/client/src/components/icons/activities/BoulderingWallIcon.tsx index 5fc077b..22e8f76 100644 --- a/client/src/components/icons/activities/BoulderingWallIcon.tsx +++ b/client/src/components/icons/activities/BoulderingWallIcon.tsx @@ -2,8 +2,8 @@ const BoulderingWallIcon = () => { return ( diff --git a/client/src/components/icons/activities/ChangingRoomsIcon.tsx b/client/src/components/icons/activities/ChangingRoomsIcon.tsx index 042766c..0752193 100644 --- a/client/src/components/icons/activities/ChangingRoomsIcon.tsx +++ b/client/src/components/icons/activities/ChangingRoomsIcon.tsx @@ -2,8 +2,8 @@ function ChangingRoomsIcon() { return ( diff --git a/client/src/components/icons/activities/ChessTablesIcon.tsx b/client/src/components/icons/activities/ChessTablesIcon.tsx index e78a834..f79496c 100644 --- a/client/src/components/icons/activities/ChessTablesIcon.tsx +++ b/client/src/components/icons/activities/ChessTablesIcon.tsx @@ -2,8 +2,8 @@ const ChessTablesIcon = () => { return ( diff --git a/client/src/components/icons/activities/ClimbingRoomIcon.tsx b/client/src/components/icons/activities/ClimbingRoomIcon.tsx index cb88ac2..3b2c19b 100644 --- a/client/src/components/icons/activities/ClimbingRoomIcon.tsx +++ b/client/src/components/icons/activities/ClimbingRoomIcon.tsx @@ -3,8 +3,8 @@ const ClimbingRoomIcon = () => { return ( diff --git a/client/src/components/icons/activities/CommunalDiningTablesIcon.tsx b/client/src/components/icons/activities/CommunalDiningTablesIcon.tsx index 0ace4ae..e4bf82a 100644 --- a/client/src/components/icons/activities/CommunalDiningTablesIcon.tsx +++ b/client/src/components/icons/activities/CommunalDiningTablesIcon.tsx @@ -2,8 +2,8 @@ const CommunalDiningTablesIcon = () => { return ( diff --git a/client/src/components/icons/activities/IndoorLapPoolIcon.tsx b/client/src/components/icons/activities/IndoorLapPoolIcon.tsx index 38d0a31..b7416c3 100644 --- a/client/src/components/icons/activities/IndoorLapPoolIcon.tsx +++ b/client/src/components/icons/activities/IndoorLapPoolIcon.tsx @@ -2,8 +2,8 @@ const IndoorLapPoolIcon = () => { return ( diff --git a/client/src/components/icons/activities/LushLandscapeIcon.tsx b/client/src/components/icons/activities/LushLandscapeIcon.tsx index 6731d3b..2e2fcfe 100644 --- a/client/src/components/icons/activities/LushLandscapeIcon.tsx +++ b/client/src/components/icons/activities/LushLandscapeIcon.tsx @@ -2,8 +2,8 @@ const LushLandscapeIcon = () => { return ( diff --git a/client/src/components/icons/activities/MultiPurposeCourtIcon.tsx b/client/src/components/icons/activities/MultiPurposeCourtIcon.tsx index dd525b1..2848118 100644 --- a/client/src/components/icons/activities/MultiPurposeCourtIcon.tsx +++ b/client/src/components/icons/activities/MultiPurposeCourtIcon.tsx @@ -2,8 +2,8 @@ const MultiPurposeCourtIcon = () => { return ( diff --git a/client/src/components/icons/activities/OutdoorCinemaIcon.tsx b/client/src/components/icons/activities/OutdoorCinemaIcon.tsx index 3bbce9d..b3645c4 100644 --- a/client/src/components/icons/activities/OutdoorCinemaIcon.tsx +++ b/client/src/components/icons/activities/OutdoorCinemaIcon.tsx @@ -2,8 +2,8 @@ const OutdoorCinemaIcon = () => { return ( diff --git a/client/src/components/icons/activities/OutdoorCoworkingSpaceIcon.tsx b/client/src/components/icons/activities/OutdoorCoworkingSpaceIcon.tsx index 563829d..1278d64 100644 --- a/client/src/components/icons/activities/OutdoorCoworkingSpaceIcon.tsx +++ b/client/src/components/icons/activities/OutdoorCoworkingSpaceIcon.tsx @@ -2,8 +2,8 @@ const OutdoorCoworkingSpaceIcon = () => { return ( diff --git a/client/src/components/icons/activities/PadelPongIcon.tsx b/client/src/components/icons/activities/PadelPongIcon.tsx index e081152..08599fc 100644 --- a/client/src/components/icons/activities/PadelPongIcon.tsx +++ b/client/src/components/icons/activities/PadelPongIcon.tsx @@ -2,8 +2,8 @@ const PadelPongIcon = () => { return ( diff --git a/client/src/components/icons/activities/PingPongInATableIcon.tsx b/client/src/components/icons/activities/PingPongInATableIcon.tsx index a831654..46a3410 100644 --- a/client/src/components/icons/activities/PingPongInATableIcon.tsx +++ b/client/src/components/icons/activities/PingPongInATableIcon.tsx @@ -2,8 +2,8 @@ const PingPongInATableIcon = () => { return ( diff --git a/client/src/components/icons/activities/RunningWheelIcon.tsx b/client/src/components/icons/activities/RunningWheelIcon.tsx index d1cdabb..2ddc910 100644 --- a/client/src/components/icons/activities/RunningWheelIcon.tsx +++ b/client/src/components/icons/activities/RunningWheelIcon.tsx @@ -2,8 +2,8 @@ const RunningWheelIcon = () => { return ( diff --git a/client/src/components/icons/activities/SunLoungingDeckIcon.tsx b/client/src/components/icons/activities/SunLoungingDeckIcon.tsx index 331df49..e369a9c 100644 --- a/client/src/components/icons/activities/SunLoungingDeckIcon.tsx +++ b/client/src/components/icons/activities/SunLoungingDeckIcon.tsx @@ -2,8 +2,8 @@ const SunLoungingDeckIcon = () => { return ( diff --git a/client/src/components/icons/activities/SuspendedLoungingNetsIcon.tsx b/client/src/components/icons/activities/SuspendedLoungingNetsIcon.tsx index bef1ee0..691bc65 100644 --- a/client/src/components/icons/activities/SuspendedLoungingNetsIcon.tsx +++ b/client/src/components/icons/activities/SuspendedLoungingNetsIcon.tsx @@ -2,8 +2,8 @@ const SuspendedLoungingNetsIcon = () => { return ( diff --git a/client/src/components/icons/activities/WellnessFeaturesIcon.tsx b/client/src/components/icons/activities/WellnessFeaturesIcon.tsx index 6cfd313..dc84e13 100644 --- a/client/src/components/icons/activities/WellnessFeaturesIcon.tsx +++ b/client/src/components/icons/activities/WellnessFeaturesIcon.tsx @@ -2,8 +2,8 @@ function WellnessFeaturesIcon() { return ( diff --git a/client/src/components/searchPage/LayoutCard.tsx b/client/src/components/searchPage/LayoutCard.tsx index 6b582f7..2760eb9 100644 --- a/client/src/components/searchPage/LayoutCard.tsx +++ b/client/src/components/searchPage/LayoutCard.tsx @@ -8,9 +8,10 @@ import { apartmentRoutes } from "../../consts/apartmentsRoutes"; interface LayoutCardProps { apartmentCard: IAparmentRes; + price?: number; } -const LayoutCard = ({ apartmentCard }: LayoutCardProps) => { +const LayoutCard = ({ apartmentCard, price }: LayoutCardProps) => { const { Project_Name: projectName, Floor: floor, @@ -118,7 +119,13 @@ const LayoutCard = ({ apartmentCard }: LayoutCardProps) => { {unitType}, {totalArea} Sqft

- Unavailable + {(price && + new Intl.NumberFormat("ae", { + style: "currency", + currency: "AED", + minimumFractionDigits: 0, + }).format(price)) || + "Unavailable"}

diff --git a/client/src/components/searchPage/LayoutOptions.tsx b/client/src/components/searchPage/LayoutOptions.tsx index e4b0ebf..caa9516 100644 --- a/client/src/components/searchPage/LayoutOptions.tsx +++ b/client/src/components/searchPage/LayoutOptions.tsx @@ -15,6 +15,7 @@ import { useDebounce } from "@uidotdev/usehooks"; import { perPageInitial } from "../../consts/initialMasterplanFilters"; import { getFilteredApartments } from "../../calc/getFilteredApartments"; import SearchLoader from "./SearchLoader"; +import _ from "lodash"; const LayoutOptions = () => { const { apartments, setApartments } = useApartments(); @@ -173,6 +174,17 @@ const LayoutOptions = () => { page, ]); + function getRandomNumber() { + const numbers = [ + 1699888, 2430888, 1732888, 1594888, 2364888, 1175888, 1054888, 2454888, + 1784888, 1014888, 2388888, 1294888, 1544888, 1339888, 1340888, 1052888, + 1366888, 1202888, 1605888, 1674888, 1216888, 1264888, 1624888, 1635888, + 1224888, 1181888, 1397888, 1756888, 1248888, 2730888, + ]; + + return _.sample(numbers); + } + return (
@@ -199,8 +211,12 @@ const LayoutOptions = () => { ) : (
{apartments && - apartments.map((apartment) => ( - + apartments.map((apartment, index) => ( + ))}
)} diff --git a/client/src/consts/apartmentLayoutsImages.ts b/client/src/consts/apartmentLayoutsImages.ts index 03f8ac0..9d5288a 100644 --- a/client/src/consts/apartmentLayoutsImages.ts +++ b/client/src/consts/apartmentLayoutsImages.ts @@ -3,19 +3,21 @@ type ApartmentLayoutsImage = Record; const apartmentLayoutImages: ApartmentLayoutsImage = { "Studio Squared-Right": "/images/layouts/studio_right.png", "Studio Squared-Left": "/images/layouts/studio_left.png", - "1 BR Squared-C Right": "/images/layouts/1br_c_right.png", - "1 BR Squared-C Left": "/images/layouts/1br_c_left.png", + "Studio Flex-Right": "/images/layouts/studio_flex_right.png", + "Studio Flex-Left": "/images/layouts/studio_flex_left.png", "1 BR Squared-A Left": "/images/layouts/1br_a_left.png", "1 BR Squared-A Right": "/images/layouts/1br_a_right.png", + "1 BR Squared-B Left": "/images/layouts/1br_b_left.png", + "1 BR Squared-C Right": "/images/layouts/1br_c_right.png", + "1 BR Squared-C Left": "/images/layouts/1br_c_left.png", + "1 BR Squared-D Left": "/images/layouts/1br_d_left.png", "2 BR Squared-A Right": "/images/layouts/2br_a_right.png", "2 BR Squared-A Left": "/images/layouts/2br_a_left.png", + "2 BR Squared-B Left": "/images/layouts/2br_b_left.png", "1 BR U1 Left": "/images/layouts/layout-5.jpg", "1 BR U1 Right": "/images/layouts/layout-6.jpg", "1 BR U2 Left": "/images/layouts/layout-7.jpg", "1 BR U2 Right": "/images/layouts/layout-8.jpg", - "Studio Flex-Right": "/images/layouts/studio_flex_right.png", - "Studio Flex-Left": "/images/layouts/studio_flex_left.png", - "2 BR Squared-B": "/images/layouts/2br_b_left.png", }; export { apartmentLayoutImages }; diff --git a/client/src/consts/markers.ts b/client/src/consts/markers.ts index c35cc42..852a0e9 100644 --- a/client/src/consts/markers.ts +++ b/client/src/consts/markers.ts @@ -2,8 +2,8 @@ import { Marker } from "../types/marker"; const markers: Marker[] = [ { - top: 33.5, - left: 51.5, + top: 37, + left: 54.5, itemNumber: 0, popup: "/images/markers/popups/1.svg", isPopupLeft: true, @@ -11,8 +11,8 @@ const markers: Marker[] = [ imgSrc: "/images/markers/2.png", }, { - top: 35.5, - left: 53, + top: 39.2, + left: 56.3, itemNumber: 1, popup: "/images/markers/popups/1.svg", isPopupLeft: false, @@ -20,8 +20,8 @@ const markers: Marker[] = [ imgSrc: "/images/markers/1.png", }, { - top: 69, - left: 20.0, + top: 74.2, + left: 20.2, itemNumber: 2, popup: "/images/markers/popups/1.svg", isPopupLeft: true, diff --git a/client/src/consts/tabs.tsx b/client/src/consts/tabs.tsx index f1200d6..68c471f 100644 --- a/client/src/consts/tabs.tsx +++ b/client/src/consts/tabs.tsx @@ -7,12 +7,12 @@ const tabs: Tab[] = [ count: 0, path: "/masterplan", }, - // { - // id: 2, - // value: "Unit Types", - // count: 0, - // path: "/unit-types", - // }, + { + id: 2, + value: "Unit Types", + count: 0, + path: "/unit-types", + }, { id: 3, value: "About IRTH", diff --git a/client/src/data/unitTypes.json b/client/src/data/unitTypes.json new file mode 100644 index 0000000..9e1edf5 --- /dev/null +++ b/client/src/data/unitTypes.json @@ -0,0 +1,272 @@ +[ + { + "id": 1, + "type": "studio-flex", + "title": "Studio flex", + "desc": "Live in the future, today.", + "sqft": 366, + "texts": [ + "In Studio Flex explore the ORI Cloud Bed, optimizing your living space with functionality and smart living.", + "When folded, it unveils a spacious living room creating a cohesive space that blends both style and functionality." + ], + "images": [ + { + "position": "left", + "src": "/images/unitTypes/withLegend/studio-flex-left.png" + }, + { + "position": "right", + "src": "/images/unitTypes/withLegend/studio-flex-right.png" + } + ], + "legends": [ + "Entrance", + "Kitchen", + "Living Room & Bedroom", + "Bathroom", + "Balcony", + "Ori Cloud Bed", + "Bi-fold Glass Doors", + "Laundry" + ], + "tourAvailable": true, + "tourUrl": "/virtual-tour/6338173000000496895" + }, + { + "id": 2, + "type": "studio-2", + "title": "Studio²", + "desc": "Live in the future, today.", + "sqft": 416, + "texts": [ + "In Studio² explore the ORI Cloud Bed, optimizing your living space with functionality and smart living.", + "When folded, it unveils a spacious living room creating a cohesive space that blends both style and functionality." + ], + "images": [ + { + "position": "left", + "src": "/images/unitTypes/withLegend/studio-2-left.png" + }, + { + "position": "right", + "src": "/images/unitTypes/withLegend/studio-2-right.png" + } + ], + "legends": [ + "Entrance", + "Kitchen", + "Living Room & Bedroom", + "Bathroom", + "Balcony", + "Flexibed", + "Bi-fold Glass Doors", + "Drop Down Study", + "Laundry" + ], + "tourAvailable": true, + "tourUrl": "/virtual-tour/6338173000000498209" + }, + { + "id": 3, + "type": "1br-type-a", + "title": "1 Bedroom²", + "desc": "Type A", + "sqft": 622, + "texts": [ + "In 1 Bedroom² double up your space with next generation features that enhance smart living.", + "With pocket walls that disappear and a Flexibed that seamlessly converts, you can trans form your living room into an extra bedroom, anytime you want!" + ], + "images": [ + { + "position": "left", + "src": "/images/unitTypes/withLegend/1br-type-a-left.png" + }, + { + "position": "right", + "src": "/images/unitTypes/withLegend/1br-type-a-right.png" + } + ], + "legends": [ + "Entrance", + "Kitchen & Dining Area", + "Bedroom", + "Bathroom", + "Living Room", + "Balcony", + "Flexibed", + "Laundry", + "Bi-fold Glass Doors", + "Study" + ] + }, + { + "id": 4, + "type": "1br-type-b", + "title": "1 Bedroom²", + "desc": "Type B", + "sqft": 770, + "texts": [ + "In 1 Bedroom² double up your space with next generation features that enhance smart living.", + "With pocket walls that disappear and a Flexibed that seamlessly converts, you can trans form your living room into an extra bedroom, anytime you want!" + ], + "images": [ + { + "position": "left", + "src": "/images/unitTypes/withLegend/1br-type-b-left.png" + }, + { + "position": "right", + "src": "/images/unitTypes/withLegend/1br-type-b-right.png" + } + ], + "legends": [ + "Entrance", + "Kitchen & Dining Area", + "Bedroom", + "Bathroom", + "Living Room", + "Balcony", + "Flexibed", + "Laundry", + "Bi-fold Glass Doors" + ] + }, + { + "id": 5, + "type": "1br-type-c", + "title": "1 Bedroom²", + "desc": "Type C", + "sqft": 642, + "texts": [ + "In 1 Bedroom² double up your space with next generation features that enhance smart living.", + "With pocket walls that disappear and a Flexibed that seamlessly converts, you can trans form your living room into an extra bedroom, anytime you want!" + ], + "images": [ + { + "position": "left", + "src": "/images/unitTypes/withLegend/1br-type-c-left.png" + }, + { + "position": "right", + "src": "/images/unitTypes/withLegend/1br-type-c-right.png" + } + ], + "legends": [ + "Entrance", + "Kitchen & Dining Area", + "Living Room", + "Bedroom", + "Walk-in Closet", + "Bathroom", + "Balcony", + "Pocket Walls", + "Flexibed", + "Laundry", + "Bi-fold Glass Doors" + ], + "tourAvailable": true, + "tourUrl": "/virtual-tour/6338173000000496864" + }, + { + "id": 6, + "type": "1br-type-d", + "title": "1 Bedroom²", + "desc": "Type D", + "sqft": 619, + "texts": [ + "In 1 Bedroom² double up your space with next generation features that enhance smart living.", + "With pocket walls that disappear and a Flexibed that seamlessly converts, you can trans form your living room into an extra bedroom, anytime you want!" + ], + "images": [ + { + "position": "left", + "src": "/images/unitTypes/withLegend/1br-type-d-left.png" + }, + { + "position": "right", + "src": "/images/unitTypes/withLegend/1br-type-d-right.png" + } + ], + "legends": [ + "Entrance", + "Kitchen & Dining Area", + "Living Room", + "Bedroom", + "Walk-in Closet", + "Bathroom", + "Balcony", + "Pocket Walls", + "Flexibed", + "Laundry", + "Bi-fold Glass Doors" + ] + }, + { + "id": 7, + "type": "2br-type-a", + "title": "2 Bedroom²", + "desc": "Type A", + "sqft": 914, + "texts": [ + "In 2 Bedroom² double up your space with next generation features that enhance smart living.", + "With pocket walls that disappear and a Flexibed that seamlessly converts, you can trans form your living room into an extra bedroom, anytime you want!" + ], + "images": [ + { + "position": "left", + "src": "/images/unitTypes/withLegend/2br-type-a-left.png" + }, + { + "position": "right", + "src": "/images/unitTypes/withLegend/2br-type-a-right.png" + } + ], + "legends": [ + "Entrance", + "Kitchen & Dining Area", + "Living Room", + "Bathroom", + "Master Bedroom", + "Master Bathroom", + "Bedroom", + "Balcony", + "Flexibed", + "Study Den", + "Bi-fold Glass Doors", + "Laundry" + ] + }, + { + "id": 8, + "type": "2br-type-b", + "title": "2 Bedroom²", + "desc": "Type B", + "sqft": 1058, + "texts": [ + "In 2 Bedroom² double up your space with next generation features that enhance smart living.", + "With pocket walls that disappear and a Flexibed that seamlessly converts, you can trans form your living room into an extra bedroom, anytime you want!" + ], + "images": [ + { + "position": "main", + "src": "/images/unitTypes/withLegend/2br-type-b.png" + } + ], + "legends": [ + "Entrance", + "Kitchen & Dining Area", + "Living Room", + "Bedroom", + "Master Bedroom", + "Master Bathroom", + "Bedroom", + "Balcony", + "Flexibed", + "Study Den", + "Bi-fold Glass Doors", + "Laundry" + ], + "tourAvailable": true, + "tourUrl": "/virtual-tour/6338173000000496898" + } +] diff --git a/client/src/index.css b/client/src/index.css index c525aa7..7f2fcbd 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -36,9 +36,7 @@ body { background-color: #f3f3f2; -} - -html { + color: #091118; } .font-usual { diff --git a/client/src/main.tsx b/client/src/main.tsx index 5fd80a0..cf0660f 100644 --- a/client/src/main.tsx +++ b/client/src/main.tsx @@ -12,6 +12,7 @@ import FavoritesPage from "./pages/FavoritesPage"; import SearchPage from "./pages/SearchPage"; import ApartmentPage from "./pages/ApartmentPage"; import VirtualTour from "./pages/VirtualTour"; +import UnitTypesItemPage from "./pages/UnitTypesItemPage"; const router = createBrowserRouter([ { @@ -40,7 +41,16 @@ const router = createBrowserRouter([ }, { path: "unit-types", - element: , + children: [ + { + index: true, + element: , + }, + { + path: ":type", + element: , + }, + ], }, { path: "about", diff --git a/client/src/pages/UnitTypesItemPage.tsx b/client/src/pages/UnitTypesItemPage.tsx new file mode 100644 index 0000000..bc18987 --- /dev/null +++ b/client/src/pages/UnitTypesItemPage.tsx @@ -0,0 +1,126 @@ +import unitTypes from "../data/unitTypes.json"; +// import { useState } from "react"; +import { useNavigate, useParams } from "react-router-dom"; +import Button from "../components/Button"; +import LeftArrowSliderIcon from "../components/icons/LeftArrowSliderIcon"; +import VirtualTourIcon from "../components/icons/VirtualTourIcon"; +import { useState } from "react"; + +function UnitTypesItemPage() { + const params = useParams(); + const navigate = useNavigate(); + const unitType = unitTypes.find((unitType) => unitType.type === params.type); + const [selectedUniTypePos, setSelectedUniTypePos] = useState("left"); + + return ( +
+
+
+
+
+
+
+

Legend

+
+
+ {unitType?.legends.map((legend, index) => ( +
+
+ {index + 1} +
+

{legend}

+
+ ))} +
+
+
+ {unitType?.images.length && unitType?.images.length > 1 ? ( + <> +
+ image.position === selectedUniTypePos + )?.src + } + alt="" + className="pointer-events-none" + /> +
+
+
+ + ) : ( +
+ +
+ )} +
+
+
+
+
+
+
+
+

{unitType?.title}

+

+ {unitType?.desc} +

+
+ +
+ {unitType?.texts.map((desc) => ( +

{desc}

+ ))} +
+
+
+

Up to {unitType?.sqft} Sqft

+ {/*

from AED 1,668,888

*/} +
+
+ {unitType?.tourAvailable && ( +
+
+ )} +
+
+ ); +} + +export default UnitTypesItemPage; diff --git a/client/src/pages/UnitTypesPage.tsx b/client/src/pages/UnitTypesPage.tsx index 53afe02..2627eb0 100644 --- a/client/src/pages/UnitTypesPage.tsx +++ b/client/src/pages/UnitTypesPage.tsx @@ -1,5 +1,59 @@ +import { useNavigate } from "react-router-dom"; +import UnitTypeCard from "../components/UnitTypesPage/UnitTypeCard"; + function UnitTypesPage() { - return
UnitTypesPage
; + const navigate = useNavigate(); + + return ( +
+
+

Unit Types

+

8

+
+
+ navigate("studio-flex")} + /> + navigate("studio-2")} + /> + navigate("1br-type-a")} + /> + navigate("1br-type-b")} + /> + navigate("1br-type-c")} + /> + navigate("1br-type-d")} + /> + navigate("2br-type-a")} + /> + navigate("2br-type-b")} + /> +
+
+ ); } export default UnitTypesPage; diff --git a/client/src/pages/VirtualTour.tsx b/client/src/pages/VirtualTour.tsx index 0e5bdf4..8a21c79 100644 --- a/client/src/pages/VirtualTour.tsx +++ b/client/src/pages/VirtualTour.tsx @@ -98,7 +98,7 @@ const VirtualTour = () => { setTimeout(() => { setIsLoading(false); - }, 1000); + }, 1500); }, [isLoadedAllSpheres]); return ( diff --git a/client/yarn.lock b/client/yarn.lock index 87a859e..078f1a7 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -709,6 +709,11 @@ resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== +"@types/lodash@^4.17.7": + version "4.17.7" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" + integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== + "@types/node@^20.14.8": version "20.14.8" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.8.tgz#45c26a2a5de26c3534a9504530ddb3b27ce031ac" @@ -1846,6 +1851,11 @@ lodash.merge@^4.6.2: resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" @@ -2414,8 +2424,16 @@ stats.js@^0.17.0: resolved "https://registry.yarnpkg.com/stats.js/-/stats.js-0.17.0.tgz#b1c3dc46d94498b578b7fd3985b81ace7131cc7d" integrity sha512-hNKz8phvYLPEcRkeG1rsGmV5ChMjKDAWU7/OJJdDErPBNChQXxCo3WZurGpnWc6gZhAzEPFad1aVgyOANH1sMw== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0: - name string-width-cjs +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -2433,7 +2451,14 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==