Skip to content

Commit d984be1

Browse files
Merge pull request #744 from DataDog/marcosaia/fix/rn-webview-imports
[FIX] Fix react-native-webview imports
2 parents 7e201e3 + 1475dac commit d984be1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/react-native-webview/src/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import React, { forwardRef, useCallback } from 'react';
99

1010
import NativeDdLogs from './ext-specs/NativeDdLogs';
1111
import { NativeDdSdk } from './ext-specs/NativeDdSdk';
12+
import { NativeDdWebView } from './specs/NativeDdWebView';
13+
import { isNewArchitecture } from './utils/env-utils';
1214
import {
1315
getWebViewEventBridgingJS,
1416
wrapJsCodeInTryAndCatch
1517
} from './utils/webview-js-utils';
1618
import type { DatadogMessageFormat } from './utils/webview-js-utils';
17-
import { isNewArchitecture } from './utils/env-utils';
18-
import { NativeDdWebView } from './specs/NativeDdWebView';
1919

2020
type Props = WebViewProps & {
2121
/**

packages/react-native-webview/src/specs/NativeDdWebView.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
import type { CommonNativeWebViewProps } from 'react-native-webview/lib/WebViewTypes';
88
import { requireNativeComponent } from 'react-native';
9-
import { isNewArchitecture } from '@datadog/mobile-react-native-webview/src/utils/env-utils';
109

10+
import { isNewArchitecture } from '../utils/env-utils';
1111

12-
const NativeDdWebView = !isNewArchitecture() ? requireNativeComponent<CommonNativeWebViewProps>(
13-
'DdReactNativeWebView'
14-
) : undefined;
12+
const NativeDdWebView = !isNewArchitecture()
13+
? requireNativeComponent<CommonNativeWebViewProps>('DdReactNativeWebView')
14+
: undefined;
1515

1616
export { NativeDdWebView };

0 commit comments

Comments
 (0)