fix sky loft chetotam tour page

This commit is contained in:
2025-08-19 12:06:30 +05:00
parent b7f6a0c1ae
commit 5ebf14f75f
2 changed files with 7 additions and 10 deletions
+4
View File
@@ -1508,6 +1508,7 @@ export const projects: Project[] = [
floor: "upper",
},
],
tourAvailable: true,
},
{
name: "Sky Loft Type B",
@@ -1650,6 +1651,7 @@ export const projects: Project[] = [
floor: "upper",
},
],
tourAvailable: true,
},
{
name: "Sky Loft Type C",
@@ -1794,6 +1796,7 @@ export const projects: Project[] = [
floor: "upper",
},
],
tourAvailable: true,
},
{
name: "Sky Loft 2 Bedroom²",
@@ -1979,6 +1982,7 @@ export const projects: Project[] = [
floor: "upper",
},
],
tourAvailable: true,
},
],
amentiesFloors: [
+3 -10
View File
@@ -9,7 +9,6 @@ import FilledHeartIcon from "../components/icons/FilledHeartIcon";
import { useFavoritesUnitsStore } from "../stores/useFavoritesUnitsStore";
import HeartIcon from "../components/icons/HeartIcon";
import slugToComplexName from "../utils/slugToComplexName";
import getUnitTypeSlug from "../utils/getUnitTypeSlug";
import { formattedUnitTypes } from "../data/formattedUnitTypes";
import { projects } from "../data/projects";
import VideoModal from "../components/VideoModal";
@@ -257,20 +256,14 @@ function UnitPage() {
<div className="flex 2xl:flex-col 2xl:gap-[0.556vw] gap-2 2xl:bottom-[2.222vw] bottom-0 bg-white md:max-2xl:-mx-[3.125vw] md:max-2xl:p-[3.125vw] max-md:-mx-4 max-md:p-4 max-2xl:rounded-t-2xl max-2xl:shadow-[0_-4px_20px_0_rgba(0,0,0,0.05)]">
{projects
.find((project) => project.slug === params.complexName)
?.types.find(
(type) =>
type.slug ===
getUnitTypeSlug(params.complexName!, unit.unitType)
)?.tourAvailable && (
?.types.find((type) => type.slug === unit.unitTypeVariantSlug)
?.tourAvailable && (
<Button
variant="cta"
size="large"
onClick={() =>
window.open(
`/virtual-tour/${params.complexName}/${getUnitTypeSlug(
params.complexName!,
unit.unitType
)}`,
`/virtual-tour/${params.complexName}/${unit.unitTypeVariantSlug}`,
"_blank"
)
}