Enable React Native strict TypeScript API (#11459)
This commit is contained in:
@@ -3,7 +3,6 @@ import {StyleSheet} from 'react-native'
|
||||
|
||||
import {type CaptchaWebViewProps} from './CaptchaWebView.shared'
|
||||
|
||||
// @ts-ignore web only, we will always redirect to the app on web (CORS)
|
||||
const REDIRECT_HOST = new URL(window.location.href).host
|
||||
|
||||
export function CaptchaWebView({
|
||||
@@ -25,13 +24,11 @@ export function CaptchaWebView({
|
||||
}, [onError])
|
||||
|
||||
const onLoad = useCallback(() => {
|
||||
// @ts-ignore web
|
||||
const frame: HTMLIFrameElement = document.getElementById(
|
||||
'captcha-iframe',
|
||||
) as HTMLIFrameElement
|
||||
|
||||
try {
|
||||
// @ts-ignore web
|
||||
const href = frame?.contentWindow?.location.href
|
||||
if (!href) return
|
||||
const urlp = new URL(href)
|
||||
|
||||
Reference in New Issue
Block a user