+
diff --git a/app/properties/[id]/page.jsx b/app/properties/[id]/page.jsx
index 1b83199..9870d70 100644
--- a/app/properties/[id]/page.jsx
+++ b/app/properties/[id]/page.jsx
@@ -3,10 +3,23 @@ import PropertyDetails from '@/components/PropertyDetails';
import connectDB from '@/config/database';
import Property from '@/models/Property';
import PropertyImages from '@/components/PropertyImages';
+import BookmarkButton from '@/components/BookmarkButton';
+import ShareButtons from '@/components/ShareButtons';
+import PropertyContactForm from '@/components/PropertyContactForm';
+import { convertToSerializeableObject } from '@/utils/convertToObject';
const PropertyPage = async ({ params }) => {
await connectDB();
- const property = await Property.findById(params.id).lean();
+ const propertyDoc = await Property.findById(params.id).lean();
+ const property = convertToSerializeableObject(propertyDoc);
+
+ if (!property) {
+ return (
+
+ Property Not Found
+
+ );
+ }
return (
<>
@@ -18,86 +31,9 @@ const PropertyPage = async ({ params }) => {
{/* */}