Share button opens Facebook post composer
All checks were successful
Build frontend / build (push) Successful in 57s

This commit is contained in:
Claw AI
2026-03-30 00:22:28 +00:00
parent ff589e4b0a
commit d3242a4147

View File

@ -343,17 +343,9 @@ export default function PropertyDetailsPage() {
<Heart className="w-5 h-5 text-gray-600" />
</button>
<button
onClick={async () => {
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"
>