@propel-nsl/propel-react-native-sdk 1.0.5 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/SDKApp.tsx +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@propel-nsl/propel-react-native-sdk",
3
- "version": "1.0.5",
3
+ "version": "1.1.1",
4
4
  "description": "Propel Mobile SDK - React Native Core",
5
5
  "files": [
6
6
  "src/",
package/src/SDKApp.tsx CHANGED
@@ -7,6 +7,12 @@
7
7
 
8
8
  import React, { useEffect, useState } from 'react';
9
9
  import { CommonActions, NavigationContainer, useNavigationContainerRef } from '@react-navigation/native';
10
+
11
+ // NavigationIndependentTree is only available in React Navigation v7+
12
+ // Fallback to a passthrough component for v6 compatibility
13
+ const NavigationIndependentTree: React.ComponentType<{ children: React.ReactNode }> =
14
+ require('@react-navigation/native').NavigationIndependentTree ??
15
+ (({ children }: { children: React.ReactNode }) => <>{children}</>);
10
16
  import { Provider } from 'react-redux';
11
17
  import { SafeAreaProvider } from 'react-native-safe-area-context';
12
18
  import { GestureHandlerRootView } from 'react-native-gesture-handler';
@@ -513,7 +519,6 @@ const SDKApp: React.FC<any> = (props) => {
513
519
 
514
520
  console.log('🔍 SDKApp render: deepLinkToRedemptionHistory=', deepLinkToRedemptionHistory, 'deepLinkToRedeem=', deepLinkToRedeem, 'deepLinkTargetValue=', deepLinkTargetValue);
515
521
  console.log('🔍 SDKApp render: isRNHostMode=', isRNHostMode, 'hasHostNavigation=', !!hostNavigation, 'hasOnClose=', !!onClose);
516
-
517
522
  return (
518
523
  <GestureHandlerRootView style={{ flex: 1 }}>
519
524
  <Provider store={store}>
@@ -525,6 +530,7 @@ const SDKApp: React.FC<any> = (props) => {
525
530
  onClose={onClose}
526
531
  >
527
532
  <SafeAreaProvider>
533
+ <NavigationIndependentTree>
528
534
  <NavigationContainer
529
535
  key={navigationKey}
530
536
  ref={navigationRef}
@@ -550,6 +556,7 @@ const SDKApp: React.FC<any> = (props) => {
550
556
  initialRouteOverride={deepLinkTargetValue}
551
557
  />
552
558
  </NavigationContainer>
559
+ </NavigationIndependentTree>
553
560
  <Toast
554
561
  config={toastConfig}
555
562
  topOffset={Platform.OS === 'ios' ? 60 : 40}