fix(#2483): delete button watch match from Pagbrazil popup

keep-around/be898469f9f71883b0e0cce8a4d675d375c4cef2
Andrei Dekterev 4 years ago
parent 2c200a2234
commit 5a39604a01
  1. 7
      src/features/BuyMatchPopup/components/BrazilPayment/hooks.tsx
  2. 15
      src/features/BuyMatchPopup/components/BrazilPayment/index.tsx
  3. 6
      src/features/BuyMatchPopup/components/BrazilPayment/styled.tsx

@ -68,6 +68,13 @@ export const useBrazilPayment = ({
} }
} }
// eslint-disable-next-line
window.onmessage = function (event) {
if (event.data === 'close') {
closePopup()
}
}
useEffect(() => { useEffect(() => {
if (open) { if (open) {
(async () => { (async () => {

@ -6,12 +6,9 @@ import { useBrazilPayment } from './hooks'
import { import {
LoaderWrapper, LoaderWrapper,
ScButton,
ScModal, ScModal,
} from './styled' } from './styled'
import { Button } from '../../styled'
export type Props = { export type Props = {
match: Match, match: Match,
open: boolean, open: boolean,
@ -28,7 +25,6 @@ export const BrazilPayment = ({
const { const {
closePopup, closePopup,
error, error,
matchLink,
src, src,
} = useBrazilPayment({ } = useBrazilPayment({
match, match,
@ -40,16 +36,7 @@ export const BrazilPayment = ({
return ( return (
<ScModal isOpen={open} withCloseButton close={closePopup}> <ScModal isOpen={open} withCloseButton close={closePopup}>
{src && open ? ( {src && open ? (
<> <iframe title='BrazilPayment' src={src} height={600} width='100%' />
<iframe title='BrazilPayment' src={src} height={600} width='100%' />
<ScButton>
<Button>
<a href={matchLink} style={{ color: 'white' }}>
<T9n t='watch_match' />
</a>
</Button>
</ScButton>
</>
) : ( ) : (
<> <>
{error ? ( {error ? (

@ -39,9 +39,3 @@ export const LoaderWrapper = styled.div`
align-items: center; align-items: center;
justify-content: center; justify-content: center;
` `
export const ScButton = styled.div`
margin-top: 20px;
display: flex;
justify-content: center;
`

Loading…
Cancel
Save