diff --git a/src/app/new-match/new-match-client.tsx b/src/app/new-match/new-match-client.tsx index ae1c0d7..f292a03 100644 --- a/src/app/new-match/new-match-client.tsx +++ b/src/app/new-match/new-match-client.tsx @@ -20,6 +20,7 @@ import AdvisorActionsCard from "@/components/Componentes/advisor-actions-card"; import MarriageAdvisorsOverlay, { useMarriageAdvisorsOverlay, } from "@/components/Componentes/marriage-advisors-overlay"; +import ErrorToast from "@/components/Componentes/error-toast"; import MatchProfileOverlay, { useMatchProfileOverlay, } from "@/components/Componentes/match-profile-overlay"; @@ -502,6 +503,8 @@ export default function NewMatchClient() { const [paymentError, setPaymentError] = useState(null); const [isInsufficientCoins, setIsInsufficientCoins] = useState(false); + const [showPaymentSuccessToast, setShowPaymentSuccessToast] = useState(false); + const [appliedDiscount, setAppliedDiscount] = useState(null); @@ -539,6 +542,7 @@ export default function NewMatchClient() { discountCode: appliedDiscount?.valid ? appliedDiscount.code : undefined, }); setIsPaymentSheetOpen(false); + setShowPaymentSuccessToast(true); openProfile(); } catch (err: any) { console.error("Payment failed", err); @@ -1166,6 +1170,14 @@ export default function NewMatchClient() { + + {showPaymentSuccessToast && ( + setShowPaymentSuccessToast(false)} + /> + )} ); } diff --git a/src/app/request-accepted/request-accepted-client.tsx b/src/app/request-accepted/request-accepted-client.tsx index de9e659..02ddae0 100644 --- a/src/app/request-accepted/request-accepted-client.tsx +++ b/src/app/request-accepted/request-accepted-client.tsx @@ -9,6 +9,7 @@ import AdvisorActionsCard from "@/components/Componentes/advisor-actions-card"; import MarriageAdvisorsOverlay, { useMarriageAdvisorsOverlay, } from "@/components/Componentes/marriage-advisors-overlay"; +import ErrorToast from "@/components/Componentes/error-toast"; import MatchProfileOverlay, { useMatchProfileOverlay, } from "@/components/Componentes/match-profile-overlay"; @@ -199,6 +200,7 @@ export default function RequestAcceptedClient() { useState(false); const [hasConfirmedFemaleContact, setHasConfirmedFemaleContact] = useState(false); + const [showPaymentSuccessToast, setShowPaymentSuccessToast] = useState(false); const profileHref = localizePath("/new-match/profile", locale); const { data: profile, isLoading } = useMarriageProfileQuery({ refetchInterval: 3000, @@ -260,6 +262,7 @@ export default function RequestAcceptedClient() { : caseStatus === "payment_done" || caseStatus === "contacted" ? t["Contact info released"] : t["Request approved!"]; + const primaryActionText = isFemaleProfile ? t["No Contact"] || t["No Contact Received"] || "No Contact" : t["View profile"]; @@ -272,6 +275,14 @@ export default function RequestAcceptedClient() { contactInfoQuery.data?.contact_info, ); + const handlePrimaryAction = () => { + if (isFemaleProfile) { + setIsDismissReasonSheetOpen(true); + } else { + openProfile(); + } + }; + const handleSecondaryAction = async () => { if (isFemaleProfile) { setIsContactReceivedConfirmOpen(true); @@ -314,6 +325,7 @@ export default function RequestAcceptedClient() { } setIsSubscriptionSheetOpen(false); + setShowPaymentSuccessToast(true); if (caseId) { await contactInfoQuery.refetch(); @@ -773,6 +785,14 @@ export default function RequestAcceptedClient() { open={isProfileOpen} onClose={closeProfile} /> + + {showPaymentSuccessToast && ( + setShowPaymentSuccessToast(false)} + /> + )} ); } diff --git a/src/components/Componentes/error-toast.tsx b/src/components/Componentes/error-toast.tsx index b94a390..6adbab3 100644 --- a/src/components/Componentes/error-toast.tsx +++ b/src/components/Componentes/error-toast.tsx @@ -51,7 +51,7 @@ export default function ErrorToast({ return (