+
+ {/* ✅ Modal for booking a survey */}
+ {openModal && (
+ {
+ setOpenModal(false);
+ setShowToast(true);
+ }}
+ />
+ )}
+
+ {/* ✅ Success Toast */}
+ setShowToast(false)}
+ message="Survey Booked Successfully!"
+ subtext="Your survey request has been sent to Domna. We'll contact you shortly. 🎉"
+ />
+
+ );
+}
diff --git a/src/app/portfolio/[slug]/building-passport/[propertyId]/page.tsx b/src/app/portfolio/[slug]/building-passport/[propertyId]/page.tsx
index ccb05275..326b6739 100644
--- a/src/app/portfolio/[slug]/building-passport/[propertyId]/page.tsx
+++ b/src/app/portfolio/[slug]/building-passport/[propertyId]/page.tsx
@@ -1,70 +1,20 @@
-import EpcCard from "@/app/components/building-passport/EpcCard";
-import { formatDateTime } from "@/app/utils";
-import {
- HomeIcon,
- BuildingOfficeIcon,
- CalendarIcon,
- HomeModernIcon,
- ClockIcon,
- UserGroupIcon,
-} from "@heroicons/react/24/solid";
import { getPropertyMeta } from "./utils";
+import BuildingPassportHomeClient from "./BuildingPassportHomeClient";
export const revalidate = 1;
-export default async function BuildingPassportHome(
- props: {
- params: Promise<{ slug: string; propertyId: string }>;
- }
-) {
- const params = await props.params;
- // This is a server component and because we make the exact same request in the layout,
- // the response is cached so we just gain access to the data
+export default async function BuildingPassportHome({
+ params,
+}: {
+ params: { slug: string; propertyId: string };
+}) {
const propertyMeta = await getPropertyMeta(params.propertyId);
+ // ✅ pass both property data and the portfolio slug (from the URL)
return (
-