Skip to content

Commit

Permalink
Merge pull request #744 from DataDog/marcosaia/fix/rn-webview-imports
Browse files Browse the repository at this point in the history
[FIX] Fix react-native-webview imports
  • Loading branch information
marco-saia-datadog authored Dec 9, 2024
2 parents 7e201e3 + 1475dac commit d984be1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/react-native-webview/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 & {
/**
Expand Down
8 changes: 4 additions & 4 deletions packages/react-native-webview/src/specs/NativeDdWebView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<CommonNativeWebViewProps>(
'DdReactNativeWebView'
) : undefined;
const NativeDdWebView = !isNewArchitecture()
? requireNativeComponent<CommonNativeWebViewProps>('DdReactNativeWebView')
: undefined;

export { NativeDdWebView };

0 comments on commit d984be1

Please sign in to comment.