NTP-17996 | RN Changes for iOS (#14059)
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { View, findNodeHandle } from "react-native";
|
||||
import { Platform, View, findNodeHandle } from "react-native";
|
||||
import Modal from "react-native-modal";
|
||||
import { GenericActionPayload } from "../../App/common/actions/GenericAction";
|
||||
import {
|
||||
AnalyticsEventNameConstants,
|
||||
AnalyticsMethodNameConstant,
|
||||
BOTTOMSHEET_ANIMATION_DURATION,
|
||||
NAVIGATION_ERROR,
|
||||
OsTypeConstants,
|
||||
TimeoutConstants,
|
||||
} from "../../App/common/constants";
|
||||
import { BOTTOMSHEET_ANIMATION_DURATION } from "../../App/common/constants/NumericalConstants";
|
||||
import { sendAsAnalyticsEvent } from "../../App/common/hooks/useAnalyticsEvent";
|
||||
import { CtaData, CtaType } from "../../App/common/interface";
|
||||
import { ModalView } from "../../App/common/interface/modals/ModalView";
|
||||
@@ -49,20 +51,30 @@ const BaseBottomSheetComponent = ({
|
||||
closeModal();
|
||||
break;
|
||||
default:
|
||||
try {
|
||||
NativeDeeplinkNavigatorModule.navigateToNaviDeeplinkNavigator(
|
||||
JSON.stringify(cta),
|
||||
);
|
||||
} catch (error) {
|
||||
sendAsAnalyticsEvent({
|
||||
name: AnalyticsEventNameConstants.HI_INVALID_SCREEN_CTA,
|
||||
properties: {
|
||||
methodName:
|
||||
AnalyticsMethodNameConstant.HANDLE_CTA_CLICK_BOTTOMSHEET,
|
||||
reason: error?.toString() || NAVIGATION_ERROR,
|
||||
},
|
||||
});
|
||||
if (Platform.OS === OsTypeConstants.IOS) {
|
||||
closeModal();
|
||||
}
|
||||
setTimeout(
|
||||
() => {
|
||||
try {
|
||||
NativeDeeplinkNavigatorModule.navigateToNaviDeeplinkNavigator(
|
||||
JSON.stringify(cta),
|
||||
);
|
||||
} catch (error) {
|
||||
sendAsAnalyticsEvent({
|
||||
name: AnalyticsEventNameConstants.HI_INVALID_SCREEN_CTA,
|
||||
properties: {
|
||||
methodName:
|
||||
AnalyticsMethodNameConstant.HANDLE_CTA_CLICK_BOTTOMSHEET,
|
||||
reason: error?.toString() || NAVIGATION_ERROR,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
Platform.OS === OsTypeConstants.IOS
|
||||
? TimeoutConstants.TIMEOUT_1000
|
||||
: 0,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user