diff --git a/_theme_files/property.html b/_theme_files/property.html index ae6aa91..95f6f09 100644 --- a/_theme_files/property.html +++ b/_theme_files/property.html @@ -442,33 +442,35 @@

Contact Property Manager

-
- - -
-
+
+ +
+
+
@@ -482,29 +484,31 @@
-
+
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 }) => { {/* */}
diff --git a/components/BookmarkButton.jsx b/components/BookmarkButton.jsx new file mode 100644 index 0000000..d134c87 --- /dev/null +++ b/components/BookmarkButton.jsx @@ -0,0 +1,11 @@ +import { FaBookmark } from 'react-icons/fa'; + +const BookmarkButton = ({ property }) => { + return ( + + ); +}; +export default BookmarkButton; diff --git a/components/PropertyContactForm.jsx b/components/PropertyContactForm.jsx new file mode 100644 index 0000000..1f2decf --- /dev/null +++ b/components/PropertyContactForm.jsx @@ -0,0 +1,81 @@ +import { FaPaperPlane } from 'react-icons/fa'; + +const PropertyContactForm = ({ property }) => { + return ( +
+

Contact Property Manager

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+ ); +}; +export default PropertyContactForm; diff --git a/components/ShareButtons.jsx b/components/ShareButtons.jsx new file mode 100644 index 0000000..a1259fa --- /dev/null +++ b/components/ShareButtons.jsx @@ -0,0 +1,10 @@ +import { FaShare } from 'react-icons/fa'; + +const ShareButtons = ({ property }) => { + return ( + + ); +}; +export default ShareButtons;