From 3a4af48d8f449effc5568c18d11d3cbebb16664d Mon Sep 17 00:00:00 2001 From: C4rnivore Date: Fri, 18 Jul 2025 18:34:23 +0500 Subject: [PATCH] Verstka complited 7 tasks --- src/components/FloorPopup.tsx | 4 +- src/components/SequenceSlider.tsx | 2 +- src/components/UnitCard.tsx | 4 +- src/components/UnitTypeCard.tsx | 4 +- src/pages/FavoritesPage.tsx | 11 +++-- src/pages/SearchPage.tsx | 69 +++++++++++++++++-------------- src/pages/UnitTypesPage.tsx | 9 ++-- 7 files changed, 55 insertions(+), 48 deletions(-) diff --git a/src/components/FloorPopup.tsx b/src/components/FloorPopup.tsx index 16ce84f..0064138 100644 --- a/src/components/FloorPopup.tsx +++ b/src/components/FloorPopup.tsx @@ -33,7 +33,7 @@ function FloorPopup({ title, complexName, data, onSelect }: FloorPopupProps) {

{title && Number.isNaN(+title!.split(" ").at(-1)!) - ? "16 Amenties" + ? "16 Amen ties" : `${ complexName === "marasi-drive" ? data[ @@ -84,7 +84,7 @@ function FloorPopup({ title, complexName, data, onSelect }: FloorPopupProps) {

Indoor Amenties -

+

diff --git a/src/components/SequenceSlider.tsx b/src/components/SequenceSlider.tsx index ce04a1a..9e9a1d1 100644 --- a/src/components/SequenceSlider.tsx +++ b/src/components/SequenceSlider.tsx @@ -232,7 +232,7 @@ function SequenceSlider({ complexName }: SequenceSliderProps) { diff --git a/src/components/UnitCard.tsx b/src/components/UnitCard.tsx index 317b889..aaed707 100644 --- a/src/components/UnitCard.tsx +++ b/src/components/UnitCard.tsx @@ -42,7 +42,7 @@ function UnitCard({ unit }: { unit: Unit }) {

@@ -91,7 +91,7 @@ function UnitCard({ unit }: { unit: Unit }) { maximumFractionDigits: 2, })} Sqft`}

- {!unit.project.includes("Marasi Drive") && ( + {(

{`AED ${Intl.NumberFormat("ar-AE", { currency: "AED", diff --git a/src/components/UnitTypeCard.tsx b/src/components/UnitTypeCard.tsx index 2d87988..2e64402 100644 --- a/src/components/UnitTypeCard.tsx +++ b/src/components/UnitTypeCard.tsx @@ -7,10 +7,10 @@ function UnitTypeCard({ project, type }: { project: Project; type: UnitType }) {

-

{project.title}

+

{project.title}

{type.wings && ( <> diff --git a/src/pages/FavoritesPage.tsx b/src/pages/FavoritesPage.tsx index c61ac09..937588d 100644 --- a/src/pages/FavoritesPage.tsx +++ b/src/pages/FavoritesPage.tsx @@ -230,10 +230,10 @@ function FavoritesPage() { className="group flex-shrink-0 2xl:w-[calc(25%-3*2.222vw/4)] md:max-2xl:w-[calc(50%-clamp(12px,1.5625vw,16px))] w-[calc(50%-clamp(8px,2.222vw,12px))]" >
-
-

+

+

{formattedUnitTypes.get(unit.unitType)} - + {`, ${unit.squareFt.toLocaleString(undefined, { maximumFractionDigits: 2, })} Sqft`} @@ -266,8 +266,7 @@ function FavoritesPage() { />

- {!unit.project.includes("Marasi Drive") && - (!removeSimilar || + {(!removeSimilar || filteredFavoriteUnits.some( ({ salesPrice }) => salesPrice !== unit.salesPrice )) && ( @@ -279,7 +278,7 @@ function FavoritesPage() { minimumFractionDigits: 0, }).format(unit.salesPrice)}`} /> - )} + )} {(!removeSimilar || filteredFavoriteUnits.some( diff --git a/src/pages/SearchPage.tsx b/src/pages/SearchPage.tsx index d84a97c..1ebf853 100644 --- a/src/pages/SearchPage.tsx +++ b/src/pages/SearchPage.tsx @@ -288,40 +288,45 @@ function SearchPage() { )}
- {showButtons && ( -
- -
- )} + + + + )} +
); diff --git a/src/pages/UnitTypesPage.tsx b/src/pages/UnitTypesPage.tsx index 0c96290..0698681 100644 --- a/src/pages/UnitTypesPage.tsx +++ b/src/pages/UnitTypesPage.tsx @@ -24,8 +24,9 @@ function UnitTypesPage() {

setSelectedProject(project)} + withAll />
@@ -38,9 +39,11 @@ function UnitTypesPage() { exit={{ opacity: 0 }} className="m-4 md:max-2xl:m-6 2xl:m-[2.222vw] grid grid-cols-1 md:max-2xl:grid-cols-2 2xl:grid-cols-4 gap-4 2xl:gap-[1.111vw]" > - {selectedProject?.types?.map((type, index) => ( + {selectedProject ? selectedProject?.types?.map((type, index) => ( - ))} + )) : projects.flatMap((proj) => proj.types.map((type, index)=> ( + + )))}