update booking confirmation

This commit is contained in:
yotakii
2026-03-10 13:36:19 +03:00
parent 921c587656
commit ff8b8a92a2
2 changed files with 46 additions and 22 deletions

View File

@@ -5,11 +5,9 @@ import { useLocation, Link } from 'react-router-dom';
const BookingConfirmation = () => {
const location = useLocation();
// نتوقع إنه صفحة الحجز تبعتنا رح تعمل navigate وتبعت state فيه request
const request = location.state?.request || null;
const WA_NUMBER = useMemo(() => {
// إذا عندك رقم ثابت حاليا
return '963986105010';
}, []);
@@ -36,7 +34,6 @@ const BookingConfirmation = () => {
const WA_LINK = useMemo(() => `https://wa.me/${WA_NUMBER}?text=${waText}`, [WA_NUMBER, waText]);
// خيار: تفتح واتساب أوتوماتيك بعد نجاح الإرسال
useEffect(() => {
if (request?.autoOpenWhatsApp) {
window.open(WA_LINK, '_blank', 'noopener,noreferrer');