From 1095ab5d29af968198391b46f7486e29e7900f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81=20=D0=9A=D0=B0=D1=82=D0=B0?= =?UTF-8?q?=D0=B5=D0=B2?= Date: Thu, 11 Apr 2024 15:54:10 +0000 Subject: [PATCH] Epe short path --- src/hooks/payment/useSinglePayment.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/hooks/payment/useSinglePayment.ts b/src/hooks/payment/useSinglePayment.ts index bf73e88..79a2ad2 100644 --- a/src/hooks/payment/useSinglePayment.ts +++ b/src/hooks/payment/useSinglePayment.ts @@ -104,6 +104,14 @@ export const useSinglePayment = () => { if (isPurchased && productUrls[targetProductKey]?.length) { return navigate(productUrls[targetProductKey]); } + + let _gender = "male"; + if (gender.length) { + _gender = gender; + } + if (user.profile.gender?.length) { + _gender = user.profile.gender; + } const paymentIntent = await api.createSinglePayment({ token, data: { @@ -115,7 +123,7 @@ export const useSinglePayment = () => { user?.profile?.sign?.sign || getZodiacSignByDate(user.profile.birthday || birthday || ""), age: user?.profile?.age?.years || 1, - gender: user.profile.gender || gender || "", + gender: _gender, }, partner: { sign: null,