From 1475dac2b777faabd63b9ad808a10a7e7d0e3546 Mon Sep 17 00:00:00 2001 From: Marco Saia Date: Fri, 6 Dec 2024 17:36:05 +0100 Subject: [PATCH] Fix react-native-webview imports --- packages/react-native-webview/src/index.tsx | 4 ++-- .../react-native-webview/src/specs/NativeDdWebView.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/react-native-webview/src/index.tsx b/packages/react-native-webview/src/index.tsx index 8b0b67b97..7b70c72be 100644 --- a/packages/react-native-webview/src/index.tsx +++ b/packages/react-native-webview/src/index.tsx @@ -9,13 +9,13 @@ import React, { forwardRef, useCallback } from 'react'; import NativeDdLogs from './ext-specs/NativeDdLogs'; import { NativeDdSdk } from './ext-specs/NativeDdSdk'; +import { NativeDdWebView } from './specs/NativeDdWebView'; +import { isNewArchitecture } from './utils/env-utils'; import { getWebViewEventBridgingJS, wrapJsCodeInTryAndCatch } from './utils/webview-js-utils'; import type { DatadogMessageFormat } from './utils/webview-js-utils'; -import { isNewArchitecture } from './utils/env-utils'; -import { NativeDdWebView } from './specs/NativeDdWebView'; type Props = WebViewProps & { /** diff --git a/packages/react-native-webview/src/specs/NativeDdWebView.ts b/packages/react-native-webview/src/specs/NativeDdWebView.ts index ae380a511..351b26a16 100644 --- a/packages/react-native-webview/src/specs/NativeDdWebView.ts +++ b/packages/react-native-webview/src/specs/NativeDdWebView.ts @@ -6,11 +6,11 @@ import type { CommonNativeWebViewProps } from 'react-native-webview/lib/WebViewTypes'; import { requireNativeComponent } from 'react-native'; -import { isNewArchitecture } from '@datadog/mobile-react-native-webview/src/utils/env-utils'; +import { isNewArchitecture } from '../utils/env-utils'; -const NativeDdWebView = !isNewArchitecture() ? requireNativeComponent( - 'DdReactNativeWebView' -) : undefined; +const NativeDdWebView = !isNewArchitecture() + ? requireNativeComponent('DdReactNativeWebView') + : undefined; export { NativeDdWebView };