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(() => {
if (open) {
(async () => {

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

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

Loading…
Cancel
Save