From 078ccc920ed56b2e5c0b278dfaaf090ff4846770 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: Tue, 2 Apr 2024 23:46:48 +0000 Subject: [PATCH] Revert "fix: remove double image key and update filter of subscription plans" --- src/api/resources/SinglePayment.ts | 1 + src/components/pages/Gender/index.tsx | 2 +- src/components/pages/PaymentWithEmailPage/index.tsx | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/resources/SinglePayment.ts b/src/api/resources/SinglePayment.ts index e7c63cd..84ab8de 100644 --- a/src/api/resources/SinglePayment.ts +++ b/src/api/resources/SinglePayment.ts @@ -15,6 +15,7 @@ export interface PayloadPost extends Payload { name: string; sign: string; age: number; + gender?: string; }; partner: { sign: string | null; diff --git a/src/components/pages/Gender/index.tsx b/src/components/pages/Gender/index.tsx index 554a250..fea93d3 100644 --- a/src/components/pages/Gender/index.tsx +++ b/src/components/pages/Gender/index.tsx @@ -20,7 +20,7 @@ function GenderPage(): JSX.Element { const selectGender = (gender: Gender) => { dispatch(actions.questionnaire.update({ gender: gender.id })); - if (pathName === "/epe/gender") { + if (pathName.includes("/epe/gender")) { return navigate(routes.client.epeBirthdate()); } navigate(`/questionnaire/profile/flowChoice`); diff --git a/src/components/pages/PaymentWithEmailPage/index.tsx b/src/components/pages/PaymentWithEmailPage/index.tsx index 1dd5e80..2266769 100644 --- a/src/components/pages/PaymentWithEmailPage/index.tsx +++ b/src/components/pages/PaymentWithEmailPage/index.tsx @@ -33,6 +33,7 @@ function PaymentWithEmailPage() { const timezone = getClientTimezone(); const dispatch = useDispatch(); const birthday = useSelector(selectors.selectBirthday); + const { gender } = useSelector(selectors.selectQuestionnaire); const locale = i18n.language; const [email, setEmail] = useState(""); const [name, setName] = useState(""); @@ -119,7 +120,7 @@ function PaymentWithEmailPage() { token, }); const currentProduct = productsSinglePayment.find( - (product) => product.key === "compatibility.pdf" + (product) => product.key === "moons.pdf.aura" ); return currentProduct; }; @@ -140,6 +141,7 @@ function PaymentWithEmailPage() { name: name || "", sign: user?.profile?.sign?.sign || getZodiacSignByDate(birthday), age: user?.profile?.age?.years || 1, + gender: gender, }, partner: { sign: "partner_cancer",