fix(#188): fix pr comment

pull/25/head
Rakov Roman 3 years ago
parent 3b002b6abc
commit 8de51f8142
  1. 2
      src/features/BuyMatchPopup/components/IframePayment/hooks.tsx
  2. 6
      src/features/JoinMatchPage/index.tsx
  3. 5
      src/features/JoinMatchPageRFEF/index.tsx
  4. 3
      src/helpers/getCurrentYear/index.tsx
  5. 1
      src/helpers/index.tsx
  6. 6
      src/pages/DiwanInsportsTv/index.tsx
  7. 6
      src/pages/Mailings/index.tsx

@ -104,7 +104,7 @@ export const useIframePayment = ({
}
useEffect(() => {
const paymentCallback = (event: any) => {
const paymentCallback = (event: MessageEvent<{ event_id: string }>) => {
if (event.data.event_id === 'paymee.complete') {
closePopup()
}

@ -1,5 +1,3 @@
import format from 'date-fns/format'
import { joinMatchLexics } from 'config/lexics/joinMatch'
import { usePageParams } from 'hooks/usePageParams'
@ -8,6 +6,8 @@ import { T9n } from 'features/T9n'
import { Name } from 'features/Name'
import { useLexicsConfig } from 'features/LexicsStore'
import { getCurrentYear } from 'helpers'
import { useUnauthenticatedMatch } from './hooks'
import {
@ -45,7 +45,7 @@ export const JoinMatchPage = () => {
onJoinClick,
} = useUnauthenticatedMatch()
const currentYear = format(new Date(), 'Y')
const currentYear = getCurrentYear()
return (
<Wrapper>

@ -1,11 +1,12 @@
import { useEffect } from 'react'
import format from 'date-fns/format'
import { joinMatchLexics } from 'config/lexics/joinMatch'
import { T9n } from 'features/T9n'
import { useLexicsConfig, useLexicsStore } from 'features/LexicsStore'
import { getCurrentYear } from 'helpers'
import { useUnauthenticatedMatch } from './hooks'
import {
@ -40,7 +41,7 @@ export const JoinMatchPageRFEF = () => {
onJoinClick,
} = useUnauthenticatedMatch()
const currentYear = format(new Date(), 'Y')
const currentYear = getCurrentYear()
const { changeLang } = useLexicsStore()

@ -0,0 +1,3 @@
import format from 'date-fns/format'
export const getCurrentYear = () => format(new Date(), 'Y')

@ -8,3 +8,4 @@ export * from './secondsToHms'
export * from './redirectToUrl'
export * from './getRandomString'
export * from './selectedApi'
export * from './getCurrentYear'

@ -1,4 +1,4 @@
import React from 'react'
import { Fragment } from 'react'
import format from 'date-fns/format'
@ -62,10 +62,10 @@ export const DiwanInsportsTv = () => {
<T9n t='diwan_join' />
</MainInfoButton>
{!isMobileDevice && (
<React.Fragment>
<Fragment>
<TunisiaLogo />
<ClubsLogo />
</React.Fragment>
</Fragment>
)}
</MatchInfo>
</BlockWrapper>

@ -2,8 +2,6 @@ import { useState } from 'react'
import { Link } from 'react-router-dom'
import { format } from 'date-fns'
import { PAGES } from 'config'
import { saveUserInfo } from 'requests'
@ -11,6 +9,8 @@ import { saveUserInfo } from 'requests'
import { T9n } from 'features/T9n'
import { useAuthStore } from 'features/AuthStore'
import { getCurrentYear } from 'helpers'
import {
Body,
ButtonsBlock,
@ -35,7 +35,7 @@ const Mailings = () => {
if (!userInfo) return null
const currentYear = format(new Date(), 'Y')
const currentYear = getCurrentYear()
const onUnsubscribe = async (isUnsubscribed: boolean) => {
if (!isUnsubscribed) {

Loading…
Cancel
Save