Render properties from JSON file
This commit is contained in:
+18
-1
@@ -1,5 +1,22 @@
|
||||
import properties from '@/properties.json';
|
||||
import PropertyCard from '@/components/PropertyCard';
|
||||
|
||||
const PropertiesPage = () => {
|
||||
return <div>PropertiesPage</div>;
|
||||
return (
|
||||
<section className='px-4 py-6'>
|
||||
<div className='container-xl lg:container m-auto px-4 py-6'>
|
||||
{properties.length === 0 ? (
|
||||
<p>No properties found</p>
|
||||
) : (
|
||||
<div className='grid grid-cols-1 md:grid-cols-3 gap-6'>
|
||||
{properties.map((property, index) => (
|
||||
<PropertyCard property={property} key={index} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default PropertiesPage;
|
||||
|
||||
Reference in New Issue
Block a user