diff --git a/app/page.jsx b/app/page.jsx index 89c302e..99bc869 100644 --- a/app/page.jsx +++ b/app/page.jsx @@ -1,13 +1,14 @@ -import Link from 'next/link'; import Hero from '../components/Hero'; import InfoBoxes from '@/components/InfoBoxes'; import Footer from '@/components/Footer'; +import HomeProperties from '@/components/HomeProperties'; const HomePage = () => { return ( <> + > ); diff --git a/components/HomeProperties.jsx b/components/HomeProperties.jsx new file mode 100644 index 0000000..e9445e2 --- /dev/null +++ b/components/HomeProperties.jsx @@ -0,0 +1,40 @@ +import properties from '@/properties.json'; +import Link from 'next/link'; +import PropertyCard from './PropertyCard'; + +const HomeProperties = () => { + const recentProperties = properties + .sort(() => Math.random() - Math.random()) + .slice(0, 3); + + return ( + <> + + + + Recent Properties + + + {recentProperties.length === 0 ? ( + No Properties Found + ) : ( + recentProperties.map((property) => ( + + )) + )} + + + + + + View All Properties + + + > + ); +}; + +export default HomeProperties;
No Properties Found