diff --git a/app/page.js b/app/page.js
index c46a7cb..ee2148f 100644
--- a/app/page.js
+++ b/app/page.js
@@ -28,6 +28,155 @@ import HeroSearch from './components/home/HeroSearch';
import PropertyMap from './components/home/PropertyMap';
import Link from 'next/link';
import Image from 'next/image';
+import { getRentProperties, getSaleProperties } from './utils/api';
+
+// Map API property data to the format the UI expects
+function mapApiProperty(item, index) {
+ const info = item.propertyInformation || item;
+ const isRent = item.monthlyRent !== undefined || item.dailyRent !== undefined;
+
+ // Determine price display
+ const dailyPrice = item.dailyRent ?? item.monthlyRent ?? item.price ?? 0;
+ const monthlyPrice = item.monthlyRent ?? 0;
+
+ // Map building type integer to string
+ const buildingTypeMap = { 0: 'apartment', 1: 'villa', 2: 'house' };
+ const propType = buildingTypeMap[info.buildingType] || 'apartment';
+
+ // Map property status integer to string
+ const statusMap = { 0: 'available', 1: 'booked', 2: 'maintenance' };
+ const status = statusMap[info.status] || 'available';
+
+ // Extract features as string array
+ const features = [];
+ if (item.isSmokeAllow) features.push('يسمح بالتدخين');
+ if (item.isVisitorAllow) features.push('يسمح بالزوار');
+ if (item.specializedFor) features.push('متخصص');
+ if (info.numberOfRooms) features.push(`${info.numberOfRooms} غرف`);
+ if (info.numberOfBathRooms) features.push(`${info.numberOfBathRooms} حمامات`);
+
+ return {
+ id: item.id ?? index + 1,
+ title: info.address || info.description?.substring(0, 40) || 'عقار',
+ description: info.description || '',
+ type: propType,
+ price: dailyPrice,
+ priceUSD: dailyPrice,
+ priceUnit: 'daily',
+ location: {
+ city: extractCity(info.address),
+ district: info.address || '',
+ address: info.address || '',
+ lat: parseFloat(info.cordsX) || 0,
+ lng: parseFloat(info.cordsY) || 0,
+ },
+ bedrooms: info.numberOfBedRooms || info.numberOfRooms || 0,
+ bathrooms: info.numberOfBathRooms || 0,
+ area: info.space || 0,
+ features,
+ images: ['/property-placeholder.jpg'],
+ status,
+ rating: item.rating || 4.5,
+ isNew: false,
+ allowedIdentities: ['syrian', 'passport'],
+ priceDisplay: {
+ daily: dailyPrice,
+ monthly: monthlyPrice,
+ },
+ bookings: [],
+ _raw: item,
+ };
+}
+
+function extractCity(address) {
+ if (!address) return '';
+ const cities = ['دمشق', 'حلب', 'حمص', 'اللاذقية', 'درعا', 'طرطوس', 'السويداء', 'دير الزور', 'الرقة', 'إدلب', 'الحسكة', 'القامشلي', 'ريف دمشق'];
+ for (const city of cities) {
+ if (address.includes(city)) return city;
+ }
+ return address.split(' ').pop() || '';
+}
+
+// Fallback dummy data
+const FALLBACK_PROPERTIES = [
+ {
+ id: 1,
+ title: 'فيلا فاخرة في المزة',
+ description: 'فيلا فاخرة مع حديقة خاصة ومسبح في أفضل أحياء دمشق.',
+ type: 'villa',
+ price: 500000,
+ priceUSD: 50,
+ priceUnit: 'daily',
+ location: { city: 'دمشق', district: 'المزة', address: 'شارع المزة - فيلات غربية', lat: 33.5138, lng: 36.2765 },
+ bedrooms: 5, bathrooms: 4, area: 450,
+ features: ['مسبح', 'حديقة خاصة', 'موقف سيارات', 'أمن 24/7', 'تدفئة مركزية', 'تكييف مركزي'],
+ images: ['/villa1.jpg', '/villa2.jpg', '/villa3.jpg'],
+ status: 'available', rating: 4.8, isNew: true,
+ allowedIdentities: ['syrian', 'passport'],
+ priceDisplay: { daily: 500000, monthly: 15000000 },
+ bookings: [{ startDate: '2024-03-10', endDate: '2024-03-15' }, { startDate: '2024-03-20', endDate: '2024-03-25' }]
+ },
+ {
+ id: 2,
+ title: 'شقة حديثة في الشهباء',
+ description: 'شقة عصرية في حي الشهباء الراقي بحلب.',
+ type: 'apartment',
+ price: 250000, priceUSD: 25, priceUnit: 'daily',
+ location: { city: 'حلب', district: 'الشهباء', address: 'شارع النيل - بناء الرحاب', lat: 36.2021, lng: 37.1347 },
+ bedrooms: 3, bathrooms: 2, area: 180,
+ features: ['مطبخ مجهز', 'بلكونة', 'موقف سيارات', 'مصعد'],
+ images: ['/apartment1.jpg', '/apartment2.jpg'],
+ status: 'available', rating: 4.5, isNew: false,
+ allowedIdentities: ['syrian'],
+ priceDisplay: { daily: 250000, monthly: 7500000 },
+ bookings: [{ startDate: '2024-03-05', endDate: '2024-03-08' }]
+ },
+ {
+ id: 3,
+ title: 'بيت عائلي في بابا عمرو',
+ description: 'بيت واسع مناسب للعائلات في حمص.',
+ type: 'house',
+ price: 350000, priceUSD: 35, priceUnit: 'daily',
+ location: { city: 'حمص', district: 'بابا عمرو', address: 'حي الزهور', lat: 34.7265, lng: 36.7186 },
+ bedrooms: 4, bathrooms: 3, area: 300,
+ features: ['حديقة كبيرة', 'موقف سيارات', 'مدفأة', 'كراج'],
+ images: ['/house1.jpg'],
+ status: 'booked', rating: 4.3, isNew: false,
+ allowedIdentities: ['syrian', 'passport'],
+ priceDisplay: { daily: 350000, monthly: 10500000 },
+ bookings: []
+ },
+ {
+ id: 4,
+ title: 'شقة بجانب البحر',
+ description: 'شقة رائعة مع إطلالة بحرية في اللاذقية.',
+ type: 'apartment',
+ price: 300000, priceUSD: 30, priceUnit: 'daily',
+ location: { city: 'اللاذقية', district: 'الشاطئ الأزرق', address: 'الكورنيش الغربي', lat: 35.5306, lng: 35.7801 },
+ bedrooms: 3, bathrooms: 2, area: 200,
+ features: ['إطلالة بحرية', 'شرفة', 'تكييف', 'أمن'],
+ images: ['/seaside1.jpg', '/seaside2.jpg', '/seaside3.jpg'],
+ status: 'available', rating: 4.9, isNew: true,
+ allowedIdentities: ['passport'],
+ priceDisplay: { daily: 300000, monthly: 9000000 },
+ bookings: []
+ },
+ {
+ id: 5,
+ title: 'فيلا في درعا',
+ description: 'فيلا فاخرة في حي الأطباء بدرعا.',
+ type: 'villa',
+ price: 400000, priceUSD: 40, priceUnit: 'daily',
+ location: { city: 'درعا', district: 'حي الأطباء', address: 'شارع الشفاء', lat: 32.6237, lng: 36.1016 },
+ bedrooms: 4, bathrooms: 3, area: 350,
+ features: ['حديقة مثمرة', 'أنظمة أمن', 'مسبح', 'كراج'],
+ images: ['/villa4.jpg', '/villa5.jpg'],
+ status: 'available', rating: 4.6, isNew: false,
+ allowedIdentities: ['syrian', 'passport'],
+ priceDisplay: { daily: 400000, monthly: 12000000 },
+ bookings: []
+ }
+];
export default function HomePage() {
const mapSectionRef = useRef(null);
@@ -39,11 +188,44 @@ export default function HomePage() {
const [showUserMenu, setShowUserMenu] = useState(false);
const menuRef = useRef(null);
+ const [allProperties, setAllProperties] = useState(FALLBACK_PROPERTIES);
+ const [loading, setLoading] = useState(true);
+
+ // Fetch properties from API on mount
useEffect(() => {
const storedUser = localStorage.getItem('user');
if (storedUser) {
setUser(JSON.parse(storedUser));
}
+
+ async function fetchProperties() {
+ try {
+ const [rentData, saleData] = await Promise.all([
+ getRentProperties().catch(() => []),
+ getSaleProperties().catch(() => []),
+ ]);
+
+ const rentList = Array.isArray(rentData) ? rentData : [];
+ const saleList = Array.isArray(saleData) ? saleData : [];
+
+ const mapped = [
+ ...rentList.map((p, i) => mapApiProperty(p, i)),
+ ...saleList.map((p, i) => mapApiProperty(p, rentList.length + i)),
+ ];
+
+ if (mapped.length > 0) {
+ setAllProperties(mapped);
+ }
+ // If API returns empty, keep fallback
+ } catch (err) {
+ console.warn('Failed to fetch properties, using fallback data:', err);
+ // keep fallback data
+ } finally {
+ setLoading(false);
+ }
+ }
+
+ fetchProperties();
}, []);
useEffect(() => {
@@ -62,179 +244,21 @@ export default function HomePage() {
setShowUserMenu(false);
};
- const [allProperties] = useState([
- {
- id: 1,
- title: 'فيلا فاخرة في المزة',
- description: 'فيلا فاخرة مع حديقة خاصة ومسبح في أفضل أحياء دمشق.',
- type: 'villa',
- price: 500000,
- priceUSD: 50,
- priceUnit: 'daily',
- location: {
- city: 'دمشق',
- district: 'المزة',
- address: 'شارع المزة - فيلات غربية',
- lat: 33.5138,
- lng: 36.2765
- },
- bedrooms: 5,
- bathrooms: 4,
- area: 450,
- features: ['مسبح', 'حديقة خاصة', 'موقف سيارات', 'أمن 24/7', 'تدفئة مركزية', 'تكييف مركزي'],
- images: ['/villa1.jpg', '/villa2.jpg', '/villa3.jpg'],
- status: 'available',
- rating: 4.8,
- isNew: true,
- allowedIdentities: ['syrian', 'passport'],
- priceDisplay: {
- daily: 500000,
- monthly: 15000000
- },
- bookings: [
- { startDate: '2024-03-10', endDate: '2024-03-15' },
- { startDate: '2024-03-20', endDate: '2024-03-25' }
- ]
- },
- {
- id: 2,
- title: 'شقة حديثة في الشهباء',
- description: 'شقة عصرية في حي الشهباء الراقي بحلب.',
- type: 'apartment',
- price: 250000,
- priceUSD: 25,
- priceUnit: 'daily',
- location: {
- city: 'حلب',
- district: 'الشهباء',
- address: 'شارع النيل - بناء الرحاب',
- lat: 36.2021,
- lng: 37.1347
- },
- bedrooms: 3,
- bathrooms: 2,
- area: 180,
- features: ['مطبخ مجهز', 'بلكونة', 'موقف سيارات', 'مصعد'],
- images: ['/apartment1.jpg', '/apartment2.jpg'],
- status: 'available',
- rating: 4.5,
- isNew: false,
- allowedIdentities: ['syrian'],
- priceDisplay: {
- daily: 250000,
- monthly: 7500000
- },
- bookings: [
- { startDate: '2024-03-05', endDate: '2024-03-08' }
- ]
- },
- {
- id: 3,
- title: 'بيت عائلي في بابا عمرو',
- description: 'بيت واسع مناسب للعائلات في حمص.',
- type: 'house',
- price: 350000,
- priceUSD: 35,
- priceUnit: 'daily',
- location: {
- city: 'حمص',
- district: 'بابا عمرو',
- address: 'حي الزهور',
- lat: 34.7265,
- lng: 36.7186
- },
- bedrooms: 4,
- bathrooms: 3,
- area: 300,
- features: ['حديقة كبيرة', 'موقف سيارات', 'مدفأة', 'كراج'],
- images: ['/house1.jpg'],
- status: 'booked',
- rating: 4.3,
- isNew: false,
- allowedIdentities: ['syrian', 'passport'],
- priceDisplay: {
- daily: 350000,
- monthly: 10500000
- },
- bookings: []
- },
- {
- id: 4,
- title: 'شقة بجانب البحر',
- description: 'شقة رائعة مع إطلالة بحرية في اللاذقية.',
- type: 'apartment',
- price: 300000,
- priceUSD: 30,
- priceUnit: 'daily',
- location: {
- city: 'اللاذقية',
- district: 'الشاطئ الأزرق',
- address: 'الكورنيش الغربي',
- lat: 35.5306,
- lng: 35.7801
- },
- bedrooms: 3,
- bathrooms: 2,
- area: 200,
- features: ['إطلالة بحرية', 'شرفة', 'تكييف', 'أمن'],
- images: ['/seaside1.jpg', '/seaside2.jpg', '/seaside3.jpg'],
- status: 'available',
- rating: 4.9,
- isNew: true,
- allowedIdentities: ['passport'],
- priceDisplay: {
- daily: 300000,
- monthly: 9000000
- },
- bookings: []
- },
- {
- id: 5,
- title: 'فيلا في درعا',
- description: 'فيلا فاخرة في حي الأطباء بدرعا.',
- type: 'villa',
- price: 400000,
- priceUSD: 40,
- priceUnit: 'daily',
- location: {
- city: 'درعا',
- district: 'حي الأطباء',
- address: 'شارع الشفاء',
- lat: 32.6237,
- lng: 36.1016
- },
- bedrooms: 4,
- bathrooms: 3,
- area: 350,
- features: ['حديقة مثمرة', 'أنظمة أمن', 'مسبح', 'كراج'],
- images: ['/villa4.jpg', '/villa5.jpg'],
- status: 'available',
- rating: 4.6,
- isNew: false,
- allowedIdentities: ['syrian', 'passport'],
- priceDisplay: {
- daily: 400000,
- monthly: 12000000
- },
- bookings: []
- }
- ]);
-
const applyFilters = (filters) => {
setSearchFilters(filters);
-
+
const filtered = allProperties.filter(property => {
if (filters.city && filters.city !== 'all' && property.location.city !== filters.city) {
return false;
}
-
+
if (filters.propertyType && filters.propertyType !== 'all' && property.type !== filters.propertyType) {
return false;
}
-
+
if (filters.priceRange && filters.priceRange !== 'all') {
const priceUSD = property.priceUSD;
- switch(filters.priceRange) {
+ switch (filters.priceRange) {
case '0-500': if (priceUSD > 50) return false; break;
case '500-1000': if (priceUSD < 51 || priceUSD > 100) return false; break;
case '1000-2000': if (priceUSD < 101 || priceUSD > 200) return false; break;
@@ -242,37 +266,37 @@ export default function HomePage() {
case '3000+': if (priceUSD < 301) return false; break;
}
}
-
+
if (filters.identityType && property.allowedIdentities) {
if (!property.allowedIdentities.includes(filters.identityType)) {
return false;
}
}
-
+
return true;
});
-
+
setFilteredProperties(filtered);
-
+
if (!showMap) {
setShowMap(true);
-
+
setTimeout(() => {
if (mapSectionRef.current) {
setIsScrolling(true);
- mapSectionRef.current.scrollIntoView({
- behavior: 'smooth',
+ mapSectionRef.current.scrollIntoView({
+ behavior: 'smooth',
block: 'center'
});
-
+
setTimeout(() => setIsScrolling(false), 1000);
}
}, 300);
} else {
if (mapSectionRef.current) {
setIsScrolling(true);
- mapSectionRef.current.scrollIntoView({
- behavior: 'smooth',
+ mapSectionRef.current.scrollIntoView({
+ behavior: 'smooth',
block: 'center'
});
setTimeout(() => setIsScrolling(false), 1000);
@@ -303,7 +327,7 @@ export default function HomePage() {
-
-
-
إيجاد منزلك الجديد
-
-
-
+
{!isOwner && }
-
+
{isOwner && (
-
+
{!showMap && !isOwner && (
-
{showMap && (
-
{isScrolling && (
-
)}
-
-
{filteredProperties.length > 0 ? (
-
@@ -494,7 +518,7 @@ export default function HomePage() {
)}
-
+
{filteredProperties.length > 0 && searchFilters && (
نوع العقار:
- {searchFilters.propertyType === 'all' ? 'الكل' :
- searchFilters.propertyType === 'apartment' ? 'شقة' :
- searchFilters.propertyType === 'villa' ? 'فيلا' : 'بيت'}
+ {searchFilters.propertyType === 'all' ? 'الكل' :
+ searchFilters.propertyType === 'apartment' ? 'شقة' :
+ searchFilters.propertyType === 'villa' ? 'فيلا' : 'بيت'}
نطاق السعر:
- {searchFilters.priceRange === 'all' ? 'جميع الأسعار' :
- searchFilters.priceRange === '0-500' ? 'أقل من 50$' :
- searchFilters.priceRange === '500-1000' ? '50$ - 100$' :
- searchFilters.priceRange === '1000-2000' ? '100$ - 200$' :
- searchFilters.priceRange === '2000-3000' ? '200$ - 300$' : 'أكثر من 300$'}
+ {searchFilters.priceRange === 'all' ? 'جميع الأسعار' :
+ searchFilters.priceRange === '0-500' ? 'أقل من 50$' :
+ searchFilters.priceRange === '500-1000' ? '50$ - 100$' :
+ searchFilters.priceRange === '1000-2000' ? '100$ - 200$' :
+ searchFilters.priceRange === '2000-3000' ? '200$ - 300$' : 'أكثر من 300$'}
@@ -536,7 +560,7 @@ export default function HomePage() {
-
- نجعل عملية إيجاد منزلك المثالي سهلة وسريعة
+ نجعل عملية إيجاد منزلك المثالي سهلة وسريعة
-
-
+
- كل عقار يتم التحقق منه بدقة لضمان الدقة والجودة.
+ كل عقار يتم التحقق منه بدقة لضمان الدقة والجودة.
-
-
-
+
سلامتك هي أولويتنا. نوفر معاملات آمنة ونحمي معلوماتك الشخصية.
-
-
-
+
اعثر على منزلك المثالي في دقائق باستخدام خوارزميات البحث والمطابقة المتقدمة لدينا.
@@ -622,4 +646,4 @@ export default function HomePage() {
);
-}
\ No newline at end of file
+}
diff --git a/app/properties/page.js b/app/properties/page.js
index 6acea43..dd1a362 100644
--- a/app/properties/page.js
+++ b/app/properties/page.js
@@ -1,8 +1,7 @@
'use client';
-import { useState } from 'react';
+import { useState, useEffect } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
-import { useTranslation } from 'react-i18next';
import {
Search,
MapPin,
@@ -32,7 +31,67 @@ import {
} from 'lucide-react';
import Image from 'next/image';
import Link from 'next/link';
+import { getRentProperties, getSaleProperties } from '../utils/api';
+// Map API data to UI format
+function mapApiProperty(item, index) {
+ const info = item.propertyInformation || item;
+
+ const dailyPrice = item.dailyRent ?? item.monthlyRent ?? item.price ?? 0;
+ const monthlyPrice = item.monthlyRent ?? 0;
+
+ const buildingTypeMap = { 0: 'apartment', 1: 'villa', 2: 'house' };
+ const propType = buildingTypeMap[info.buildingType] || 'apartment';
+
+ const statusMap = { 0: 'available', 1: 'booked', 2: 'maintenance' };
+ const status = statusMap[info.status] || 'available';
+
+ const features = [];
+ if (item.isSmokeAllow) features.push('يسمح بالتدخين');
+ if (item.isVisitorAllow) features.push('يسمح بالزوار');
+ if (info.numberOfRooms) features.push(`${info.numberOfRooms} غرف`);
+ if (info.numberOfBathRooms) features.push(`${info.numberOfBathRooms} حمامات`);
+
+ return {
+ id: item.id ?? index + 1,
+ title: info.address || info.description?.substring(0, 40) || 'عقار',
+ description: info.description || '',
+ type: propType,
+ price: dailyPrice,
+ priceUnit: 'daily',
+ location: {
+ city: extractCity(info.address),
+ district: info.address || '',
+ },
+ bedrooms: info.numberOfBedRooms || info.numberOfRooms || 0,
+ bathrooms: info.numberOfBathRooms || 0,
+ area: info.space || 0,
+ features,
+ images: ['/property-placeholder.jpg'],
+ status,
+ rating: item.rating || 4.5,
+ isNew: false,
+ _raw: item,
+ };
+}
+
+function extractCity(address) {
+ if (!address) return '';
+ const cities = ['دمشق', 'حلب', 'حمص', 'اللاذقية', 'درعا', 'طرطوس', 'السويداء', 'دير الزور', 'الرقة', 'إدلب', 'الحسكة', 'القامشلي', 'ريف دمشق'];
+ for (const city of cities) {
+ if (address.includes(city)) return city;
+ }
+ return '';
+}
+
+// Fallback data
+const FALLBACK_PROPERTIES = [
+ { id: 1, title: 'فيلا فاخرة في المزة', description: 'فيلا فاخرة مع حديقة خاصة ومسبح في أفضل أحياء دمشق.', type: 'villa', price: 500000, priceUnit: 'daily', location: { city: 'دمشق', district: 'المزة' }, bedrooms: 5, bathrooms: 4, area: 450, features: ['مسبح', 'حديقة خاصة', 'موقف سيارات', 'أمن'], images: ['/villa1.jpg'], status: 'available', rating: 4.8, isNew: true },
+ { id: 2, title: 'شقة حديثة في الشهباء', description: 'شقة عصرية في حي الشهباء الراقي بحلب.', type: 'apartment', price: 250000, priceUnit: 'daily', location: { city: 'حلب', district: 'الشهباء' }, bedrooms: 3, bathrooms: 2, area: 180, features: ['مطبخ مجهز', 'بلكونة', 'موقف سيارات', 'مصعد'], images: ['/apartment1.jpg'], status: 'available', rating: 4.5, isNew: false },
+ { id: 3, title: 'بيت عائلي في بابا عمرو', description: 'بيت واسع مناسب للعائلات في حمص.', type: 'house', price: 350000, priceUnit: 'daily', location: { city: 'حمص', district: 'بابا عمرو' }, bedrooms: 4, bathrooms: 3, area: 300, features: ['حديقة كبيرة', 'موقف سيارات', 'مدفأة'], images: ['/house1.jpg'], status: 'booked', rating: 4.3, isNew: false },
+ { id: 4, title: 'شقة بجانب البحر', description: 'شقة رائعة مع إطلالة بحرية في اللاذقية.', type: 'apartment', price: 300000, priceUnit: 'daily', location: { city: 'اللاذقية', district: 'الشاطئ الأزرق' }, bedrooms: 3, bathrooms: 2, area: 200, features: ['إطلالة بحرية', 'شرفة', 'تكييف'], images: ['/seaside1.jpg'], status: 'available', rating: 4.9, isNew: true },
+ { id: 5, title: 'فيلا في درعا', description: 'فيلا فاخرة في حي الأطباء بدرعا.', type: 'villa', price: 400000, priceUnit: 'daily', location: { city: 'درعا', district: 'حي الأطباء' }, bedrooms: 4, bathrooms: 3, area: 350, features: ['حديقة مثمرة', 'أنظمة أمن', 'مسبح'], images: ['/villa4.jpg'], status: 'available', rating: 4.6, isNew: false },
+];
const PropertyCard = ({ property, viewMode = 'grid' }) => {
const [isFavorite, setIsFavorite] = useState(false);
@@ -43,7 +102,7 @@ const PropertyCard = ({ property, viewMode = 'grid' }) => {
};
const getPropertyTypeIcon = (type) => {
- switch(type) {
+ switch (type) {
case 'villa': return ;
case 'apartment': return ;
case 'house': return ;
@@ -53,7 +112,7 @@ const PropertyCard = ({ property, viewMode = 'grid' }) => {
};
const getPropertyTypeLabel = (type) => {
- switch(type) {
+ switch (type) {
case 'villa': return 'فيلا';
case 'apartment': return 'شقة';
case 'house': return 'بيت';
@@ -83,9 +142,7 @@ const PropertyCard = ({ property, viewMode = 'grid' }) => {
- {property.isNew && (
-
- جديد
-
- )}
@@ -113,11 +165,7 @@ const PropertyCard = ({ property, viewMode = 'grid' }) => {
{getPropertyTypeIcon(property.type)}
{getPropertyTypeLabel(property.type)}
-
+
{property.status === 'available' ? 'متاح' : 'محجوز'}
@@ -148,22 +196,7 @@ const PropertyCard = ({ property, viewMode = 'grid' }) => {
-
- {property.description}
-
-
-
- {property.features.slice(0, 4).map((feature, idx) => (
-
- {feature}
-
- ))}
- {property.features.length > 4 && (
-
- +{property.features.length - 4}
-
- )}
-
+ {property.description}
{
fill
className="object-cover"
/>
- {property.images.length > 1 && (
-
- {property.images.map((_, idx) => (
-
- )}
- {property.isNew && (
-
- جديد
-
- )}
@@ -232,9 +247,7 @@ const PropertyCard = ({ property, viewMode = 'grid' }) => {
{getPropertyTypeLabel(property.type)}
{property.status === 'available' && (
-
- متاح
-
+ متاح
)}
{property.title}
@@ -270,19 +283,6 @@ const PropertyCard = ({ property, viewMode = 'grid' }) => {
-
- {property.features.slice(0, 3).map((feature, idx) => (
-
- {feature}
-
- ))}
- {property.features.length > 3 && (
-
- +{property.features.length - 3}
-
- )}
-
-
{
{ id: 'apartment', label: 'شقة', icon: Building2 },
{ id: 'villa', label: 'فيلا', icon: Home },
{ id: 'house', label: 'بيت', icon: Home },
- { id: 'studio', label: 'استوديو', icon: Building2 }
];
const priceRanges = [
@@ -364,11 +363,7 @@ const FilterBar = ({ filters, onFilterChange }) => {