develop #31

Merged
andrey.dekterev merged 2 commits from develop into master 3 years ago
  1. 1
      src/config/lexics/payment.tsx
  2. 8
      src/features/Matches/hooks.tsx
  3. 11
      src/features/UserAccount/components/CancelSubPopup/index.tsx
  4. 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,

@ -13,8 +13,6 @@ import { useRequest } from 'hooks'
import { usePreferencesStore } from 'features/PreferencesPopup' import { usePreferencesStore } from 'features/PreferencesPopup'
import { isMobileDevice } from 'config/userAgent' import { isMobileDevice } from 'config/userAgent'
import { checkUrlParams } from 'helpers/parseUrlParams/parseUrlParams'
import { prepareMatches } from './helpers/prepareMatches' import { prepareMatches } from './helpers/prepareMatches'
export type Match = ReturnType<typeof prepareMatches>[number] export type Match = ReturnType<typeof prepareMatches>[number]
@ -68,10 +66,10 @@ export const useMatches = ({ fetch }: Props) => {
isFetching, isFetching,
]) ])
const dateParam = checkUrlParams('date')
useEffect(() => { useEffect(() => {
if (dateParam) { const isDefaultUrl = window.location.href.slice(0, -1) === window.location.origin
if (!isDefaultUrl) {
fetchMatches(0).then(setMatches) fetchMatches(0).then(setMatches)
pageRef.current = 1 pageRef.current = 1
} }

@ -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