Browse Source

fix ui request send

master
mortezaei 10 hours ago
parent
commit
f9be584db4
  1. 2
      src/app/candidate-contact/candidate-contact-client.tsx
  2. 10
      src/app/new-match/profile/page.tsx
  3. 16
      src/app/request-accepted/request-accepted-client.tsx
  4. 4
      src/app/request-sent/request-sent-client.tsx

2
src/app/candidate-contact/candidate-contact-client.tsx

@ -89,7 +89,7 @@ export default function CandidateContactClient() {
});
};
if (isProfileLoading || isRedirecting) {
if ((isProfileLoading && !profile) || !profile) {
return <PageLoadingSkeleton />;
}

10
src/app/new-match/profile/page.tsx

@ -311,15 +311,17 @@ export default function NewMatchProfilePage({
const caseStatus = profile?.active_case?.status;
const isFemaleProfile = profile?.gender === "female";
const respondMutation = useRespondToMarriageCaseMutation(caseId ?? "", {
onSuccess: async (_, variables) => {
onSuccess: async (data, variables) => {
onClose?.();
if (variables.action === "accept") {
const { data: updatedProfile } = await refetchProfile();
const nextPath = getSubmitPath(updatedProfile);
const nextPath =
profile?.gender === "female"
? "/request-accepted"
: "/request-sent";
router.replace(localizePath(nextPath, locale));
return;
}
onClose?.();
router.replace(localizePath("/finding-match", locale));
},
});

16
src/app/request-accepted/request-accepted-client.tsx

@ -253,7 +253,7 @@ export default function RequestAcceptedClient() {
enabled: false,
});
if (isLoading || isRedirecting) {
if ((isLoading && !profile) || !profile) {
return <PageLoadingSkeleton />;
}
@ -626,7 +626,7 @@ export default function RequestAcceptedClient() {
type="button"
onClick={() => setIsOutcomeSheetOpen(true)}
disabled={outcomeMutation.isPending}
className="w-full h-[50px] px-6 rounded-full bg-gradient-to-r from-[#FF6687] to-[#FF456C] text-white font-bold text-[15px] flex items-center justify-center shadow-sm transition-transform active:scale-[0.98] cursor-pointer hover:opacity-95 disabled:opacity-50"
className="w-full h-[50px] px-6 rounded-[14px] bg-gradient-to-r from-[#FF6687] to-[#FF456C] text-white font-bold text-[15px] flex items-center justify-center shadow-sm transition-transform active:scale-[0.98] cursor-pointer hover:opacity-95 disabled:opacity-50"
>
{outcomeMutation.isPending ? (
<LoadingThreeDot className="text-white" />
@ -639,7 +639,7 @@ export default function RequestAcceptedClient() {
<button
type="button"
onClick={() => openProfile()}
className="flex-1 h-[50px] px-3 rounded-full border border-[#E2E8F0] bg-white/95 backdrop-blur-sm text-[#334155] font-bold text-[14px] shadow-sm flex items-center justify-center transition-transform active:scale-[0.98] cursor-pointer hover:bg-[#F8FAFC]"
className="flex-1 h-[50px] px-3 rounded-[14px] border border-[#E2E8F0] bg-white/95 backdrop-blur-sm text-[#334155] font-bold text-[14px] shadow-sm flex items-center justify-center transition-transform active:scale-[0.98] cursor-pointer hover:bg-[#F8FAFC]"
>
{t["View Profile"]}
</button>
@ -648,7 +648,7 @@ export default function RequestAcceptedClient() {
type="button"
onClick={() => setIsOutcomeSheetOpen(true)}
disabled={outcomeMutation.isPending}
className="flex-1 h-[50px] px-3 rounded-full bg-gradient-to-r from-[#FF6687] to-[#FF456C] text-white font-bold text-[14px] flex items-center justify-center shadow-sm transition-transform active:scale-[0.98] cursor-pointer hover:opacity-95 disabled:opacity-50"
className="flex-1 h-[50px] px-3 rounded-[14px] bg-gradient-to-r from-[#FF6687] to-[#FF456C] text-white font-bold text-[14px] flex items-center justify-center shadow-sm transition-transform active:scale-[0.98] cursor-pointer hover:opacity-95 disabled:opacity-50"
>
{outcomeMutation.isPending ? (
<LoadingThreeDot className="text-white" />
@ -669,7 +669,7 @@ export default function RequestAcceptedClient() {
contactStatusMutation.isPending ||
noContactReportedSuccess
}
className="flex-1 min-h-[48px] px-3.5 py-2.5 rounded-full border border-[#E2E8F0] bg-white/95 backdrop-blur-sm text-[#475569] font-bold text-[13.5px] leading-tight shadow-sm flex items-center justify-center text-center whitespace-nowrap transition-all cursor-pointer hover:bg-[#F8FAFC] active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed"
className="flex-1 min-h-[48px] px-3.5 py-2.5 rounded-[14px] border border-[#E2E8F0] bg-white/95 backdrop-blur-sm text-[#475569] font-bold text-[13.5px] leading-tight shadow-sm flex items-center justify-center text-center whitespace-nowrap transition-all cursor-pointer hover:bg-[#F8FAFC] active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed"
>
{contactStatusMutation.isPending ? (
<LoadingThreeDot />
@ -682,7 +682,7 @@ export default function RequestAcceptedClient() {
href={profileHref}
className="flex-1 max-w-[170px]"
>
<div className="w-full min-h-[48px] px-3.5 py-2.5 rounded-full border border-[#E2E8F0] bg-white/95 backdrop-blur-sm text-[#475569] font-bold text-[14px] leading-tight shadow-sm flex items-center justify-center text-center whitespace-nowrap transition-all hover:bg-[#F8FAFC] active:scale-[0.98]">
<div className="w-full min-h-[48px] px-3.5 py-2.5 rounded-[14px] border border-[#E2E8F0] bg-white/95 backdrop-blur-sm text-[#475569] font-bold text-[14px] leading-tight shadow-sm flex items-center justify-center text-center whitespace-nowrap transition-all hover:bg-[#F8FAFC] active:scale-[0.98]">
{primaryActionText}
</div>
</Link>
@ -696,7 +696,7 @@ export default function RequestAcceptedClient() {
disabled={paymentMutation.isPending}
className={
isFemaleProfile
? "flex-1 min-h-[48px] px-3.5 py-2.5 rounded-full bg-gradient-to-r from-[#FF6687] to-[#FF456C] text-white font-bold text-[13.5px] leading-tight flex items-center justify-center text-center whitespace-nowrap shadow-sm transition-all cursor-pointer hover:opacity-95 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed"
? "flex-1 min-h-[48px] px-3.5 py-2.5 rounded-[14px] bg-gradient-to-r from-[#FF6687] to-[#FF456C] text-white font-bold text-[13.5px] leading-tight flex items-center justify-center text-center whitespace-nowrap shadow-sm transition-all cursor-pointer hover:opacity-95 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed"
: "flex-1 max-w-[170px] min-h-[48px] appearance-none border-0 bg-transparent p-0 text-center cursor-pointer transition-transform active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed"
}
>
@ -707,7 +707,7 @@ export default function RequestAcceptedClient() {
secondaryActionText
)
) : (
<div className="w-full h-full min-h-[48px] px-3.5 py-2.5 rounded-full bg-gradient-to-r from-[#FF6687] to-[#FF456C] text-white font-bold text-[14px] leading-tight flex items-center justify-center text-center whitespace-nowrap shadow-sm hover:opacity-95">
<div className="w-full h-full min-h-[48px] px-3.5 py-2.5 rounded-[14px] bg-gradient-to-r from-[#FF6687] to-[#FF456C] text-white font-bold text-[14px] leading-tight flex items-center justify-center text-center whitespace-nowrap shadow-sm hover:opacity-95">
{paymentMutation.isPending ? (
<LoadingThreeDot className="text-white" />
) : (

4
src/app/request-sent/request-sent-client.tsx

@ -55,7 +55,7 @@ export default function RequestSentClient() {
return getSubmitPath(profile) !== "/request-sent";
}, [profile]);
if (isLoading || isRedirecting) {
if ((isLoading && !profile) || !profile) {
return <PageLoadingSkeleton />;
}
@ -126,7 +126,7 @@ export default function RequestSentClient() {
onClick={openProfile}
className="mt-12 w-full max-w-[300px] cursor-pointer transition-transform active:scale-[0.97]"
>
<div className="rounded-full bg-gradient-to-r from-[#FF6687] to-[#FF456C] px-6 py-4 text-[16px] font-bold text-white shadow-sm hover:opacity-95">
<div className="rounded-[14px] bg-gradient-to-r from-[#FF6687] to-[#FF456C] px-6 py-4 text-[16px] font-bold text-white shadow-sm hover:opacity-95">
{requestSentCopy.matchProfile}
</div>
</button>

Loading…
Cancel
Save