mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
Use request type directly from the library that provides this param
This commit is contained in:
@@ -12,6 +12,7 @@ import React, { useEffect, useState } from "react";
|
||||
import { Linking } from "react-native";
|
||||
import { EventRegister } from "react-native-event-listeners";
|
||||
import WebView from "react-native-webview";
|
||||
import type { ShouldStartLoadRequest } from "react-native-webview/lib/WebViewTypes";
|
||||
import { log } from "sharedHelpers/logger";
|
||||
import { composeEmail } from "sharedHelpers/mail";
|
||||
import { useFontScale } from "sharedHooks";
|
||||
@@ -71,15 +72,8 @@ type WebViewSource = {
|
||||
}
|
||||
}
|
||||
|
||||
type WebViewRequest = {
|
||||
url: string;
|
||||
navigationType?: "click" | "other";
|
||||
mainDocumentURL?: string | null;
|
||||
isTopFrame?: boolean;
|
||||
}
|
||||
|
||||
export function onShouldStartLoadWithRequest(
|
||||
request: WebViewRequest,
|
||||
request: ShouldStartLoadRequest,
|
||||
source: WebViewSource,
|
||||
params: FullPageWebViewParams,
|
||||
setSource?: ( source: WebViewSource ) => void
|
||||
@@ -241,7 +235,7 @@ const FullPageWebView = ( ) => {
|
||||
className="h-full w-full flex-1"
|
||||
source={source}
|
||||
onShouldStartLoadWithRequest={
|
||||
( request: WebViewRequest ) => onShouldStartLoadWithRequest(
|
||||
request => onShouldStartLoadWithRequest(
|
||||
request,
|
||||
source,
|
||||
params,
|
||||
|
||||
Reference in New Issue
Block a user