diff --git a/src/features/BuyMatchPopup/components/BrazilPayment/hooks.tsx b/src/features/BuyMatchPopup/components/BrazilPayment/hooks.tsx index 5873a996..e7707141 100644 --- a/src/features/BuyMatchPopup/components/BrazilPayment/hooks.tsx +++ b/src/features/BuyMatchPopup/components/BrazilPayment/hooks.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 () => { diff --git a/src/features/BuyMatchPopup/components/BrazilPayment/index.tsx b/src/features/BuyMatchPopup/components/BrazilPayment/index.tsx index 332623f4..f3e26150 100644 --- a/src/features/BuyMatchPopup/components/BrazilPayment/index.tsx +++ b/src/features/BuyMatchPopup/components/BrazilPayment/index.tsx @@ -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 ( {src && open ? ( - <> -