fix(#247): add inform to cancel sub for gpay

pull/30/head
Andrei Dekterev 3 years ago
parent 1d56682a60
commit 6acacd93d0
  1. 1
      src/config/lexics/payment.tsx
  2. 11
      src/features/UserAccount/components/CancelSubPopup/index.tsx
  3. 1
      src/requests/getUserSubscribes.tsx

@ -20,6 +20,7 @@ export const paymentLexics = {
error_empty_state: 19821, error_empty_state: 19821,
error_payment_unsuccessful: 14446, error_payment_unsuccessful: 14446,
if_you_cancel: 18189, if_you_cancel: 18189,
is_gpay: 20045,
next_payment: 18183, next_payment: 18183,
notify_by_email: 18366, notify_by_email: 18366,
order_received: 18365, order_received: 18365,

@ -43,12 +43,13 @@ export const CancelSubPopup = (props: Props) => {
const { const {
access_to, access_to,
is_gpay,
lexic, lexic,
option_sys_name, option_sys_name,
} = subscribe } = subscribe
return ( return (
<Modal isOpen={isModalOpen} withCloseButton={false}> <Modal isOpen={isModalOpen} withCloseButton={is_gpay}>
<Wrapper> <Wrapper>
{isSubCanceled || error ? ( {isSubCanceled || error ? (
<ScNotificationPopup> <ScNotificationPopup>
@ -65,6 +66,12 @@ export const CancelSubPopup = (props: Props) => {
</HeaderTitle> </HeaderTitle>
</Header> </Header>
<Body> <Body>
{is_gpay ? (
<Text>
<T9n t='is_gpay' />
</Text>
) : (
<>
<Text> <Text>
<T9n t='if_you_cancel' /> <T9n t='if_you_cancel' />
</Text> </Text>
@ -91,6 +98,8 @@ export const CancelSubPopup = (props: Props) => {
<T9n t='save_sub' /> <T9n t='save_sub' />
</ScSaveSubBtn> </ScSaveSubBtn>
</Footer> </Footer>
</>
)}
</Body> </Body>
</> </>
)} )}

@ -12,6 +12,7 @@ export type Subscribe = {
dt_next_billing: string | null, dt_next_billing: string | null,
is_access: boolean, is_access: boolean,
is_active: boolean, is_active: boolean,
is_gpay?: boolean,
iso: string, iso: string,
lexic: number, lexic: number,
lexic1: number, lexic1: number,

Loading…
Cancel
Save