diff --git a/app/property/[id]/page.js b/app/property/[id]/page.js index 97b6792..208704a 100644 --- a/app/property/[id]/page.js +++ b/app/property/[id]/page.js @@ -343,17 +343,9 @@ export default function PropertyDetailsPage() { { - const url = window.location.href; - const title = property?.title || 'عقار'; - if (navigator.share) { - try { - await navigator.share({ title, text: `تحقق من هذا العقار: ${title}`, url }); - } catch {} - } else { - await navigator.clipboard.writeText(url); - toast.success('تم نسخ الرابط'); - } + onClick={() => { + const url = encodeURIComponent(window.location.href); + window.open(`https://www.facebook.com/sharer/sharer.php?u=${url}`, '_blank', 'width=600,height=400'); }} className="p-2 hover:bg-gray-100 rounded-full transition-colors" >