diff --git a/index.html b/index.html index 1f7cf1c..d06d2f6 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + Rove Home diff --git a/public/images/floor-plans/compass.png b/public/images/floor-plans/compass.png new file mode 100644 index 0000000..f975539 Binary files /dev/null and b/public/images/floor-plans/compass.png differ diff --git a/public/images/floor-plans/dubai-marina/ground.png b/public/images/floor-plans/dubai-marina/ground.png index e1ed955..30866dd 100644 Binary files a/public/images/floor-plans/dubai-marina/ground.png and b/public/images/floor-plans/dubai-marina/ground.png differ diff --git a/public/images/floor-plans/dubai-marina/podium.png b/public/images/floor-plans/dubai-marina/podium.png index b781b35..59c3dfd 100644 Binary files a/public/images/floor-plans/dubai-marina/podium.png and b/public/images/floor-plans/dubai-marina/podium.png differ diff --git a/public/images/floor-plans/dubai-marina/rooftop.png b/public/images/floor-plans/dubai-marina/rooftop.png index 787eb5e..6516591 100644 Binary files a/public/images/floor-plans/dubai-marina/rooftop.png and b/public/images/floor-plans/dubai-marina/rooftop.png differ diff --git a/public/images/unit-types/dubai-marina/1-bedroom-a.jpg b/public/images/unit-types/dubai-marina/1-bedroom-a.jpg index 82cb076..22429ef 100644 Binary files a/public/images/unit-types/dubai-marina/1-bedroom-a.jpg and b/public/images/unit-types/dubai-marina/1-bedroom-a.jpg differ diff --git a/public/images/unit-types/dubai-marina/1-bedroom-b.jpg b/public/images/unit-types/dubai-marina/1-bedroom-b.jpg index 8f7ab49..c3ddc57 100644 Binary files a/public/images/unit-types/dubai-marina/1-bedroom-b.jpg and b/public/images/unit-types/dubai-marina/1-bedroom-b.jpg differ diff --git a/public/images/unit-types/dubai-marina/1-bedroom-c.jpg b/public/images/unit-types/dubai-marina/1-bedroom-c.jpg index 36d64b3..2ddd0b4 100644 Binary files a/public/images/unit-types/dubai-marina/1-bedroom-c.jpg and b/public/images/unit-types/dubai-marina/1-bedroom-c.jpg differ diff --git a/public/images/unit-types/dubai-marina/1-bedroom-d.jpg b/public/images/unit-types/dubai-marina/1-bedroom-d.jpg index e4a2612..238379e 100644 Binary files a/public/images/unit-types/dubai-marina/1-bedroom-d.jpg and b/public/images/unit-types/dubai-marina/1-bedroom-d.jpg differ diff --git a/public/images/unit-types/dubai-marina/1-bedroom-loft-a.jpg b/public/images/unit-types/dubai-marina/1-bedroom-loft-a.jpg index 0ff5412..b1f3d07 100644 Binary files a/public/images/unit-types/dubai-marina/1-bedroom-loft-a.jpg and b/public/images/unit-types/dubai-marina/1-bedroom-loft-a.jpg differ diff --git a/public/images/unit-types/dubai-marina/1-bedroom-loft-b.jpg b/public/images/unit-types/dubai-marina/1-bedroom-loft-b.jpg index 4efa16f..637c164 100644 Binary files a/public/images/unit-types/dubai-marina/1-bedroom-loft-b.jpg and b/public/images/unit-types/dubai-marina/1-bedroom-loft-b.jpg differ diff --git a/public/images/unit-types/dubai-marina/1-bedroom-loft-c.jpg b/public/images/unit-types/dubai-marina/1-bedroom-loft-c.jpg index c6f5a63..f8921a8 100644 Binary files a/public/images/unit-types/dubai-marina/1-bedroom-loft-c.jpg and b/public/images/unit-types/dubai-marina/1-bedroom-loft-c.jpg differ diff --git a/public/images/unit-types/dubai-marina/2-bedroom-a.jpg b/public/images/unit-types/dubai-marina/2-bedroom-a.jpg index 5f24c21..4fb92b4 100644 Binary files a/public/images/unit-types/dubai-marina/2-bedroom-a.jpg and b/public/images/unit-types/dubai-marina/2-bedroom-a.jpg differ diff --git a/public/images/unit-types/dubai-marina/2-bedroom-loft.jpg b/public/images/unit-types/dubai-marina/2-bedroom-loft.jpg index 247f6ee..b469ca2 100644 Binary files a/public/images/unit-types/dubai-marina/2-bedroom-loft.jpg and b/public/images/unit-types/dubai-marina/2-bedroom-loft.jpg differ diff --git a/public/images/unit-types/dubai-marina/studio-2-a.jpg b/public/images/unit-types/dubai-marina/studio-2-a.jpg index 09e6143..978fec3 100644 Binary files a/public/images/unit-types/dubai-marina/studio-2-a.jpg and b/public/images/unit-types/dubai-marina/studio-2-a.jpg differ diff --git a/public/images/unit-types/dubai-marina/studio-2-b.jpg b/public/images/unit-types/dubai-marina/studio-2-b.jpg index b3bbd1f..3261c9e 100644 Binary files a/public/images/unit-types/dubai-marina/studio-2-b.jpg and b/public/images/unit-types/dubai-marina/studio-2-b.jpg differ diff --git a/public/images/unit-types/dubai-marina/studio-2-c.jpg b/public/images/unit-types/dubai-marina/studio-2-c.jpg index 7332d60..1db11cc 100644 Binary files a/public/images/unit-types/dubai-marina/studio-2-c.jpg and b/public/images/unit-types/dubai-marina/studio-2-c.jpg differ diff --git a/public/images/unit-types/marasi-drive/1-bedroom-a.jpg b/public/images/unit-types/marasi-drive/1-bedroom-a.jpg index ec4e7fe..e57c3ff 100644 Binary files a/public/images/unit-types/marasi-drive/1-bedroom-a.jpg and b/public/images/unit-types/marasi-drive/1-bedroom-a.jpg differ diff --git a/public/images/unit-types/marasi-drive/1-bedroom-b.jpg b/public/images/unit-types/marasi-drive/1-bedroom-b.jpg index cc572ab..a423cf6 100644 Binary files a/public/images/unit-types/marasi-drive/1-bedroom-b.jpg and b/public/images/unit-types/marasi-drive/1-bedroom-b.jpg differ diff --git a/public/images/unit-types/marasi-drive/1-bedroom-c.jpg b/public/images/unit-types/marasi-drive/1-bedroom-c.jpg index 54b0a2a..ab42344 100644 Binary files a/public/images/unit-types/marasi-drive/1-bedroom-c.jpg and b/public/images/unit-types/marasi-drive/1-bedroom-c.jpg differ diff --git a/public/images/unit-types/marasi-drive/1-bedroom-d.jpg b/public/images/unit-types/marasi-drive/1-bedroom-d.jpg index 7ecd104..e8a4e2c 100644 Binary files a/public/images/unit-types/marasi-drive/1-bedroom-d.jpg and b/public/images/unit-types/marasi-drive/1-bedroom-d.jpg differ diff --git a/public/images/unit-types/marasi-drive/2-bedroom-a.jpg b/public/images/unit-types/marasi-drive/2-bedroom-a.jpg index 437aab9..0a42dc0 100644 Binary files a/public/images/unit-types/marasi-drive/2-bedroom-a.jpg and b/public/images/unit-types/marasi-drive/2-bedroom-a.jpg differ diff --git a/public/images/unit-types/marasi-drive/2-bedroom-b.jpg b/public/images/unit-types/marasi-drive/2-bedroom-b.jpg index 3bc5ed6..558c058 100644 Binary files a/public/images/unit-types/marasi-drive/2-bedroom-b.jpg and b/public/images/unit-types/marasi-drive/2-bedroom-b.jpg differ diff --git a/public/images/unit-types/marasi-drive/studio-2.jpg b/public/images/unit-types/marasi-drive/studio-2.jpg index 6bf287c..d2e7165 100644 Binary files a/public/images/unit-types/marasi-drive/studio-2.jpg and b/public/images/unit-types/marasi-drive/studio-2.jpg differ diff --git a/public/images/unit-types/marasi-drive/studio-flex.jpg b/public/images/unit-types/marasi-drive/studio-flex.jpg index 9b968de..5fc782a 100644 Binary files a/public/images/unit-types/marasi-drive/studio-flex.jpg and b/public/images/unit-types/marasi-drive/studio-flex.jpg differ diff --git a/public/irth.png b/public/irth.png new file mode 100644 index 0000000..ec1f1bc Binary files /dev/null and b/public/irth.png differ diff --git a/public/vite.svg b/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/FloorPopup.tsx b/src/components/FloorPopup.tsx index 0064138..e008ddf 100644 --- a/src/components/FloorPopup.tsx +++ b/src/components/FloorPopup.tsx @@ -1,9 +1,11 @@ +import { useMemo } from "react"; import { formattedUnitTypes } from "../data/formattedUnitTypes"; import { usePopupStore } from "../stores/usePopupStore"; import { FloorsData } from "./FloorSelect"; import ArrowRightIcon from "./icons/ArrowRightIcon"; import HumanIcon from "./icons/HumanIcon"; import Button from "./ui/Button"; +import { projects } from "../data/projects"; interface FloorPopupProps { title: string; @@ -12,41 +14,50 @@ interface FloorPopupProps { onSelect: (floor: string) => void; } +function getAmentiesCount(complexName: string, title: string) { + const amenties = projects.find( + (proj) => proj.slug === complexName + )?.amentiesFloors; + return amenties?.find((amenty) => amenty.title === title); +} + function FloorPopup({ title, complexName, data, onSelect }: FloorPopupProps) { const { setPopup } = usePopupStore(); + const amentiesCount = useMemo( + () => + Number.isNaN(+title.at(-1)!) + ? getAmentiesCount(complexName, title) + : null, + [title, complexName] + ); return (

- {Number.isNaN(+title.split(" ").at(-1)!) - ? title - : `${title.split(" ").at(-1)} floor`} + {amentiesCount ? title : `${title.split(" ").at(-1)} floor`}

- {complexName === "marasi-drive" && - !Number.isNaN(+title.split(" ").at(-1)!) && ( -

- {title.split(" ")[0]} Wing -

- )} + {complexName === "marasi-drive" && !amentiesCount && ( +

{title.split(" ")[0]} Wing

+ )}

- {title && Number.isNaN(+title!.split(" ").at(-1)!) - ? "16 Amen ties" + {amentiesCount !== null + ? `${amentiesCount?.total} Amenties` : `${ - complexName === "marasi-drive" + complexName === "marasi-drive" && data ? data[ title.split(" ")[0] === "East" ? "East" : title.split(" ")[0] === "West" ? "West" : "others" - ].totalUnits - : data.others.totalUnits + ]?.totalUnits + : data?.others.totalUnits } apartments`}

- {!Number.isNaN(+title.split(" ").at(-1)!) && ( + {!amentiesCount && (
@@ -55,9 +66,12 @@ function FloorPopup({ title, complexName, data, onSelect }: FloorPopupProps) {
)}
-
-
- {!Number.isNaN(+title.split(" ").at(-1)!) ? ( + {((amentiesCount?.indoor && amentiesCount?.outdoor) || + !amentiesCount) && ( +
+ )} +
+ {!amentiesCount && data ? ( Object.entries( data[ title.split(" ")[0] === "East" @@ -78,22 +92,26 @@ function FloorPopup({ title, complexName, data, onSelect }: FloorPopupProps) { )) ) : ( <> -
-

- 8 -

-

- Indoor Amenties -

-
-
-

- 8 -

-

- Outdoor Amenties -

-
+ {amentiesCount?.indoor && ( +
+

+ {amentiesCount.indoor} +

+

+ Indoor Amenties +

+
+ )} + {amentiesCount?.outdoor && ( +
+

+ {amentiesCount.outdoor} +

+

+ Outdoor Amenties +

+
+ )} )}
diff --git a/src/components/FloorSelect.tsx b/src/components/FloorSelect.tsx index a306959..d605515 100644 --- a/src/components/FloorSelect.tsx +++ b/src/components/FloorSelect.tsx @@ -42,7 +42,7 @@ const constrainPosition = ( // Ограничение по X: 10% от ширины изображения const limitXPercent = 0.1; const maxOffsetX = scaledWidth * limitXPercent; - + const minX = centerX - maxOffsetX; const maxX = centerX + maxOffsetX; @@ -75,7 +75,7 @@ const calculateMinZoom = (containerSize: Size, imageSize: Size): number => { // Используем только высоту для подгонки - изображение должно занимать всю высоту экрана const heightRatio = containerSize.height / imageSize.height; - + return heightRatio; }; @@ -483,7 +483,7 @@ function FloorSelect({ // Вычисляем минимальный зум на основе высоты контейнера const newMinZoom = calculateMinZoom({ width, height }, originalSize); minZoomRef.current = newMinZoom; - + // Устанавливаем максимальный зум как минимальный + 50% maxZoomRef.current = newMinZoom * maxZoomMultiplier; @@ -606,7 +606,9 @@ function FloorSelect({ else setSide(!wing || wing === "East" ? "left" : "right"); if ( data.some( - (floorData) => floorData.floor === +floor!.split(" ").at(-1)! + (floorData) => + floorData.floor === +floor!.split(" ").at(-1)! || + floorData.floor === +floor!.split(" ").at(-1)!.split("-")[0] ) || SPECIAL_FLOORS.includes(floor) ) @@ -616,7 +618,9 @@ function FloorSelect({ complexName={complexName} data={ data.find( - (floorData) => floorData.floor === +floor!.split(" ").at(-1)! + (floorData) => + floorData.floor === +floor!.split(" ").at(-1)! || + floorData.floor === +floor!.split(" ").at(-1)!.split("-")[0] )! } onSelect={handleFloorClick} @@ -634,8 +638,6 @@ function FloorSelect({ setPopup(null); }, [pathname]); - - const imageStyle = { transform: `translate(${position.x}px, ${position.y}px) scale(${zoom})`, transformOrigin: "0 0", @@ -713,13 +715,14 @@ function FloorSelect({ fillOpacity={0.4} className={clsx( "transition-[fill] pointer-events-none", - hoveredFloor && + ((hoveredFloor && floorTitle === (complexName === "dubai-marina" ? hoveredFloor : SPECIAL_FLOORS.includes(hoveredFloor) ? hoveredFloor - : hoveredFloor.split(" ").at(-1)!) && + : hoveredFloor.split(" ").at(-1)!)) || + selectedFloor?.split(" ").at(-1) === floorTitle) && "fill-[#00BED7]" )} /> diff --git a/src/components/UnitCard.tsx b/src/components/UnitCard.tsx index aaed707..ed70106 100644 --- a/src/components/UnitCard.tsx +++ b/src/components/UnitCard.tsx @@ -73,7 +73,7 @@ function UnitCard({ unit }: { unit: Unit }) {
-
+
- {( + {

{`AED ${Intl.NumberFormat("ar-AE", { currency: "AED", minimumFractionDigits: 0, }).format(unit.salesPrice)}`}

- )} + }
); diff --git a/src/components/UnitTypeCard.tsx b/src/components/UnitTypeCard.tsx index 2e64402..6861c15 100644 --- a/src/components/UnitTypeCard.tsx +++ b/src/components/UnitTypeCard.tsx @@ -21,7 +21,7 @@ function UnitTypeCard({ project, type }: { project: Project; type: UnitType }) {

{type.floors}

-
+
Ground Level

-
+
+ podium
-
+
+ podiumSky 44 - Rooftop

-
+
+ podiumGround Level

-
+
+ podium
-
+
+ podiumRooftop

-
+
+ podium
-
+
+ sky-garden void; defaultOption: string; className?: string; label?: string; + maxOptionsCount?: number; }) { const [isShow, setIsShow] = useState(false); const [selectedOption, setSelectedOption] = useState(defaultOption); @@ -32,18 +34,39 @@ function Select({ useEffect(() => onSelect(selectedOption), [selectedOption]); function handleScroll() { - if (dropDownRef.current) - dropDownRef.current.style.maxHeight = `calc(100vh - ${ - dropDownRef.current?.getBoundingClientRect().y - }px - 0.278vw)`; + if (!dropDownRef.current) return; + dropDownRef.current.style.maxHeight = `calc(100vh - ${ + dropDownRef.current?.getBoundingClientRect().y + }px - 0.278vw)`; + } + + function dropdownRefCallback(el: HTMLDivElement) { + if (!el) return; + + dropDownRef.current = el; + + if (!maxOptionsCount) return; + + const optionHeight = el.clientHeight / options.length; + + el.style.maxHeight = `${optionHeight * maxOptionsCount}px`; + + const scrollOffset = + (options.findIndex((option) => option === selectedOption) - + Math.floor(maxOptionsCount / 2)) * + optionHeight; + + el.scrollTo({ top: scrollOffset }); } useEffect(() => { + if (maxOptionsCount) return; + handleScroll(); document.addEventListener("scroll", handleScroll); return () => document.removeEventListener("scroll", handleScroll); - }, [isShow]); + }, [isShow, maxOptionsCount]); return (
@@ -74,7 +97,7 @@ function Select({ animate={{ opacity: 1 }} exit={{ opacity: 0 }} transition={{ duration: 0.15 }} - ref={dropDownRef} + ref={dropdownRefCallback} className="absolute 2xl:mt-[0.278vw] 2xl:pt-[0.278vw] mt-1 p-1 2xl:space-y-[0.139vw] space-y-0.5 shadow-[0px_2px_8px_rgba(0,0,0,0.15)] overflow-auto rounded-xl bg-white w-full z-1" > {options.map((option, index) => ( diff --git a/src/data/masks.ts b/src/data/masks.ts index 10c107b..0c18585 100644 --- a/src/data/masks.ts +++ b/src/data/masks.ts @@ -162,9 +162,9 @@ export const floorsMasks = { "37": "m2038.5 504-160.7 16.317c-1.02.104-1.8.964-1.8 1.99v19.5c0 1.177 1.01 2.1 2.18 1.991L2038.5 529h55.5l122.88 7.373a2 2 0 0 0 2.12-1.997v-20.992c0-1.058-.82-1.933-1.88-1.997L2094 504z", "38": "M1876 496.78v18.5a2 2 0 0 0 2.21 1.989L2038.5 500.5h55.5l122.87 7.864a2.003 2.003 0 0 0 2.13-1.996v-19.999c0-1.052-.81-1.924-1.86-1.996L2094 476h-55.5l-160.73 18.793a2 2 0 0 0-1.77 1.987", // "39": "M1869 470.768v17.515a2.003 2.003 0 0 0 2.21 1.989L2038.5 473h55.5l122.86 8.846a2 2 0 0 0 2.14-1.995v-20.005c0-1.042-.8-1.91-1.84-1.993L2094 448h-55.5l-167.75 20.783c-1 .124-1.75.975-1.75 1.985", - "39" : "M1869,470.77v17.51c0,1.19,1.03,2.11,2.21,1.99l167.29-17.27h55.5l122.86,8.85c1.15.08,2.14-.83,2.14-1.99v-20.01c-.04-1.78-.1-5.48,0-6.03v-20c0-1.03-.78-1.89-1.81-1.99l-123.19-11.83h-55.5l-167.77,22.77c-.99.13-1.73.98-1.73,1.98v19.48c.02,2.02.05,6.16,0,6.54Z", + "39-40": "M1869,470.77v17.51c0,1.19,1.03,2.11,2.21,1.99l167.29-17.27h55.5l122.86,8.85c1.15.08,2.14-.83,2.14-1.99v-20.01c-.04-1.78-.1-5.48,0-6.03v-20c0-1.03-.78-1.89-1.81-1.99l-123.19-11.83h-55.5l-167.77,22.77c-.99.13-1.73.98-1.73,1.98v19.48c.02,2.02.05,6.16,0,6.54Z", // "40": "M1869 444.747v19.483a2 2 0 0 0 2.25 1.984L2038.5 445h55.5l122.82 10.809a2.004 2.004 0 0 0 2.18-1.993v-19.999c0-1.03-.78-1.892-1.81-1.991L2094 420h-55.5l-167.77 22.765a2 2 0 0 0-1.73 1.982", - "41": "M1869,420.21v17.5c0,1.21,1.07,2.15,2.27,1.98l167.23-22.69h55.5l122.81,11.79c1.17.11,2.19-.81,2.19-1.99v-46.03c0-1.01-.76-1.86-1.76-1.98l-123.24-14.79h-55.33c-.11,0-.23.01-.34.03l-167.67,29.18c-.96.17-1.66,1-1.66,1.97v25.03Z", + "41-42": "M1869,420.21v17.5c0,1.21,1.07,2.15,2.27,1.98l167.23-22.69h55.5l122.81,11.79c1.17.11,2.19-.81,2.19-1.99v-46.03c0-1.01-.76-1.86-1.76-1.98l-123.24-14.79h-55.33c-.11,0-.23.01-.34.03l-167.67,29.18c-.96.17-1.66,1-1.66,1.97v25.03Z", // "41": "M1869 420.212v17.498a2 2 0 0 0 2.27 1.982L2038.5 417h55.5l122.81 11.79a2 2 0 0 0 2.19-1.991v-19.996c0-1.025-.77-1.884-1.79-1.989L2094 392h-55.34c-.11 0-.21.008-.31.024l-167.66 26.212c-.97.152-1.69.99-1.69 1.976", // "42": "M1869 395.182v18.474c0 1.23 1.1 2.169 2.31 1.975l167.03-26.606c.11-.017.21-.025.32-.025H2094l122.79 12.77a2 2 0 0 0 2.21-1.989v-19.007c0-1.012-.76-1.865-1.76-1.985L2094 364h-55.33c-.11 0-.23.01-.34.03l-167.67 29.182a2 2 0 0 0-1.66 1.97", Rooftop: @@ -667,34 +667,48 @@ export const enumerationMasks: Record< height: 20, d: "M2263.03 505.335c-1.43 0-2.47-.6-2.94-1.404l.9-.636c.42.66 1.05 1.02 2.03 1.02 1.27 0 2-.624 2-1.56 0-.924-.77-1.56-1.98-1.56h-.85v-1.008h.85c1.09 0 1.8-.6 1.8-1.452 0-.864-.67-1.452-1.82-1.452-.9 0-1.49.348-1.85.936l-.88-.624c.46-.744 1.43-1.332 2.76-1.332 1.83 0 2.98 1.008 2.98 2.4 0 .936-.53 1.62-1.42 1.956v.024c1.05.372 1.6 1.128 1.6 2.148 0 1.476-1.21 2.544-3.18 2.544m7.76 0c-1.94 0-3.18-1.02-3.18-2.496 0-1.02.58-1.74 1.63-2.148v-.024c-.9-.372-1.44-1.092-1.44-2.028 0-1.392 1.19-2.376 2.99-2.376 1.83 0 3 .984 3 2.376 0 .936-.55 1.632-1.44 1.98v.024c1.05.42 1.63 1.176 1.63 2.196 0 1.476-1.24 2.496-3.19 2.496m0-5.136c1.06 0 1.81-.636 1.81-1.488 0-.828-.66-1.44-1.81-1.44s-1.8.612-1.8 1.44c0 .852.76 1.488 1.8 1.488m0 .972c-1.17 0-1.99.672-1.99 1.62 0 .888.72 1.536 1.99 1.536 1.29 0 2.01-.648 2.01-1.536 0-.948-.83-1.62-2.01-1.62", }, - "39": { - x: 2251, - y: 463.402, - width: 33, + "39-40": { + x: 2241, + y: 447.602, + width: 52.956, height: 20, - d: "M2263.03 478.534c-1.43 0-2.47-.6-2.94-1.404l.9-.636c.42.66 1.05 1.02 2.03 1.02 1.27 0 2-.624 2-1.56 0-.924-.77-1.56-1.98-1.56h-.85v-1.008h.85c1.09 0 1.8-.6 1.8-1.452 0-.864-.67-1.452-1.82-1.452-.9 0-1.49.348-1.85.936l-.88-.624c.46-.744 1.43-1.332 2.76-1.332 1.83 0 2.98 1.008 2.98 2.4 0 .936-.53 1.62-1.42 1.956v.024c1.05.372 1.6 1.128 1.6 2.148 0 1.476-1.21 2.544-3.18 2.544m5.12-.396.42-.984c.41.228.89.36 1.43.36 1.91 0 2.69-1.596 2.8-3.624h-.03c-.51.732-1.4 1.116-2.37 1.116-1.61 0-2.78-1.08-2.78-2.724 0-1.668 1.2-2.82 3.06-2.82 2.5 0 3.24 2.088 3.24 4.164 0 2.328-.93 4.908-3.91 4.908-.73 0-1.35-.156-1.86-.396m2.47-4.128c.89 0 1.95-.432 1.95-1.608 0-.876-.6-1.932-1.96-1.932-1.11 0-1.82.696-1.82 1.764 0 1.02.66 1.776 1.83 1.776", + d: "M2253.51 462.734c-1.43 0-2.48-.6-2.94-1.404l.9-.636c.42.66 1.05 1.02 2.02 1.02 1.28 0 2.01-.624 2.01-1.56 0-.924-.77-1.56-1.98-1.56h-.85v-1.008h.85c1.09 0 1.8-.6 1.8-1.452 0-.864-.67-1.452-1.83-1.452-.9 0-1.48.348-1.84.936l-.88-.624c.46-.744 1.43-1.332 2.76-1.332 1.82 0 2.98 1.008 2.98 2.4 0 .936-.53 1.62-1.42 1.956v.024c1.04.372 1.6 1.128 1.6 2.148 0 1.476-1.22 2.544-3.18 2.544m5.12-.396.42-.984c.41.228.89.36 1.43.36 1.9 0 2.68-1.596 2.79-3.624h-.02c-.52.732-1.41 1.116-2.38 1.116-1.61 0-2.77-1.08-2.77-2.724 0-1.668 1.2-2.82 3.06-2.82 2.5 0 3.24 2.088 3.24 4.164 0 2.328-.94 4.908-3.91 4.908-.73 0-1.36-.156-1.86-.396m2.47-4.128c.89 0 1.94-.432 1.94-1.608 0-.876-.6-1.932-1.95-1.932-1.12 0-1.83.696-1.83 1.764 0 1.02.66 1.776 1.84 1.776m4.58 1.344v-1.056h2.86v1.056zm10.9.024v1.008h-1.61v2.016h-1.18v-2.016h-4.44v-.876l4.13-5.916h1.49v5.784zm-5.94 0h3.15v-4.476h-.02zm9.85 3.156c-2.59 0-3.18-2.196-3.18-4.524 0-2.316.57-4.548 3.18-4.548 2.59 0 3.18 2.196 3.18 4.524 0 2.316-.58 4.548-3.18 4.548m0-1.02c1.81 0 1.99-1.8 1.99-3.516s-.18-3.516-1.99-3.516-1.99 1.8-1.99 3.516.18 3.516 1.99 3.516" }, - "40": { - x: 2251, - y: 436.602, - width: 33, + // "39": { + // x: 2251, + // y: 463.402, + // width: 33, + // height: 20, + // d: "M2263.03 478.534c-1.43 0-2.47-.6-2.94-1.404l.9-.636c.42.66 1.05 1.02 2.03 1.02 1.27 0 2-.624 2-1.56 0-.924-.77-1.56-1.98-1.56h-.85v-1.008h.85c1.09 0 1.8-.6 1.8-1.452 0-.864-.67-1.452-1.82-1.452-.9 0-1.49.348-1.85.936l-.88-.624c.46-.744 1.43-1.332 2.76-1.332 1.83 0 2.98 1.008 2.98 2.4 0 .936-.53 1.62-1.42 1.956v.024c1.05.372 1.6 1.128 1.6 2.148 0 1.476-1.21 2.544-3.18 2.544m5.12-.396.42-.984c.41.228.89.36 1.43.36 1.91 0 2.69-1.596 2.8-3.624h-.03c-.51.732-1.4 1.116-2.37 1.116-1.61 0-2.78-1.08-2.78-2.724 0-1.668 1.2-2.82 3.06-2.82 2.5 0 3.24 2.088 3.24 4.164 0 2.328-.93 4.908-3.91 4.908-.73 0-1.35-.156-1.86-.396m2.47-4.128c.89 0 1.95-.432 1.95-1.608 0-.876-.6-1.932-1.96-1.932-1.11 0-1.82.696-1.82 1.764 0 1.02.66 1.776 1.83 1.776", + // }, + // "40": { + // x: 2251, + // y: 436.602, + // width: 33, + // height: 20, + // d: "M2266.89 448.578v1.008h-1.61v2.016h-1.17v-2.016h-4.44v-.876l4.13-5.916h1.48v5.784zm-5.94 0h3.16v-4.476h-.03zm9.85 3.156c-2.59 0-3.18-2.196-3.18-4.524 0-2.316.58-4.548 3.18-4.548s3.18 2.196 3.18 4.524c0 2.316-.57 4.548-3.18 4.548m0-1.02c1.82 0 2-1.8 2-3.516s-.18-3.516-2-3.516c-1.81 0-1.99 1.8-1.99 3.516s.18 3.516 1.99 3.516", + // }, + "41-42": { + x: 2241, + y: 396, + width: 52.956, height: 20, - d: "M2266.89 448.578v1.008h-1.61v2.016h-1.17v-2.016h-4.44v-.876l4.13-5.916h1.48v5.784zm-5.94 0h3.16v-4.476h-.03zm9.85 3.156c-2.59 0-3.18-2.196-3.18-4.524 0-2.316.58-4.548 3.18-4.548s3.18 2.196 3.18 4.524c0 2.316-.57 4.548-3.18 4.548m0-1.02c1.82 0 2-1.8 2-3.516s-.18-3.516-2-3.516c-1.81 0-1.99 1.8-1.99 3.516s.18 3.516 1.99 3.516", - }, - "41": { - x: 2251, - y: 409.801, - width: 33, - height: 20, - d: "M2266.89 421.777v1.008h-1.61v2.016h-1.17v-2.016h-4.44v-.876l4.13-5.916h1.48v5.784zm-5.94 0h3.16v-4.476h-.03zm7.29 3.024v-1.044h2.14v-6.3c-.66.396-1.4.636-2.14.828v-1.044c.99-.3 1.83-.696 2.52-1.248h.81v7.764h2.14v1.044z", - }, - "42": { - x: 2251, - y: 383, - width: 33, - height: 20, - d: "M2266.89 394.976v1.008h-1.61V398h-1.17v-2.016h-4.44v-.876l4.13-5.916h1.48v5.784zm-5.94 0h3.16V390.5h-.03zm6.91 3.024v-.852l3.08-3.072c.86-.852 1.41-1.62 1.41-2.472 0-.888-.59-1.5-1.71-1.5-.9 0-1.46.384-1.95 1.068l-.85-.66c.65-.9 1.56-1.452 2.88-1.452 1.78 0 2.82.996 2.82 2.46 0 .948-.44 1.884-1.4 2.844l-2.58 2.568v.024h4.16V398z", + d: 'M2257.37 407.976v1.008h-1.61V411h-1.17v-2.016h-4.44v-.876l4.12-5.916h1.49v5.784zm-5.94 0h3.16V403.5h-.03zm7.28 3.024v-1.044h2.15v-6.3c-.66.396-1.4.636-2.15.828v-1.044c1-.3 1.84-.696 2.52-1.248h.82v7.764h2.13V411zm6.97-3.048v-1.056h2.86v1.056zm10.9.024v1.008h-1.61V411h-1.18v-2.016h-4.44v-.876l4.13-5.916h1.49v5.784zm-5.94 0h3.15V403.5h-.02zm6.91 3.024v-.852l3.07-3.072c.86-.852 1.42-1.62 1.42-2.472 0-.888-.59-1.5-1.72-1.5-.9 0-1.45.384-1.94 1.068l-.86-.66c.65-.9 1.56-1.452 2.88-1.452 1.78 0 2.82.996 2.82 2.46 0 .948-.44 1.884-1.4 2.844l-2.58 2.568v.024h4.16V411z' }, + // "41": { + // x: 2251, + // y: 409.801, + // width: 33, + // height: 20, + // d: "M2266.89 421.777v1.008h-1.61v2.016h-1.17v-2.016h-4.44v-.876l4.13-5.916h1.48v5.784zm-5.94 0h3.16v-4.476h-.03zm7.29 3.024v-1.044h2.14v-6.3c-.66.396-1.4.636-2.14.828v-1.044c.99-.3 1.83-.696 2.52-1.248h.81v7.764h2.14v1.044z", + // }, + // "42": { + // x: 2251, + // y: 383, + // width: 33, + // height: 20, + // d: "M2266.89 394.976v1.008h-1.61V398h-1.17v-2.016h-4.44v-.876l4.13-5.916h1.48v5.784zm-5.94 0h3.16V390.5h-.03zm6.91 3.024v-.852l3.08-3.072c.86-.852 1.41-1.62 1.41-2.472 0-.888-.59-1.5-1.71-1.5-.9 0-1.46.384-1.95 1.068l-.85-.66c.65-.9 1.56-1.452 2.88-1.452 1.78 0 2.82.996 2.82 2.46 0 .948-.44 1.884-1.4 2.844l-2.58 2.568v.024h4.16V398z", + // }, "Sky 44": { x: 2240, y: 313, diff --git a/src/data/projects.ts b/src/data/projects.ts index 06bbb31..a64bbd4 100644 --- a/src/data/projects.ts +++ b/src/data/projects.ts @@ -525,6 +525,28 @@ export const projects: Project[] = [ tourAvailable: true, }, ], + amentiesFloors: [ + { + title: "Rooftop", + total: 10, + }, + { + title: "Sky Garden", + total: 15, + indoor: 3, + outdoor: 12, + }, + { + title: "Podium Level", + total: 27, + indoor: 13, + outdoor: 14, + }, + { + title: "Ground Level", + total: 7, + }, + ], }, { title: "Rove Home Dubai Marina", @@ -1767,5 +1789,21 @@ export const projects: Project[] = [ ], }, ], + amentiesFloors: [ + { + title: "Rooftop", + total: 14, + }, + { + title: "Podium Level", + total: 21, + indoor: 8, + outdoor: 13, + }, + { + title: "Ground Level", + total: 14, + }, + ], }, ]; diff --git a/src/pages/FloorsPage.tsx b/src/pages/FloorsPage.tsx index 962958c..cc4b7bd 100644 --- a/src/pages/FloorsPage.tsx +++ b/src/pages/FloorsPage.tsx @@ -25,7 +25,6 @@ import { usePopupStore } from "../stores/usePopupStore"; import { isMobile } from "react-device-detect"; import FloorPlanDubaiMarina39_40 from "../components/FloorPlanDubaiMarina39_40"; import FloorPlanDubaiMarina41_42 from "../components/FloorPlanDubaiMarina41_42"; -// import Button from "../components/ui/Button"; function FloorsPage() { const { complexName } = useParams(); @@ -45,16 +44,14 @@ function FloorsPage() { }); const { data: unitsOnFloor } = useQuery({ - enabled: - !!selectedFloor && - !SPECIAL_FLOORS.includes(selectedFloor), + enabled: !!selectedFloor && !SPECIAL_FLOORS.includes(selectedFloor), queryKey: ["units-on-floor", complexName, selectedFloor], queryFn: () => api .get( - `units/on-floor?project=${slugToComplexName( - complexName! - )}&floor=${selectedFloor?.split(" ").at(-1)}${ + `units/on-floor?project=${slugToComplexName(complexName!)}&floor=${ + selectedFloor?.split(" ").at(-1)?.split("-")[0] + }${ complexName === "marasi-drive" ? `&wing=${selectedFloor?.split(" ")[0]}` : "" @@ -105,11 +102,20 @@ function FloorsPage() {