TP-84996 | Caching in RN (#13461)

This commit is contained in:
Prajjaval Verma
2024-11-07 15:31:54 +05:30
committed by GitHub
parent 4d8bb91bbe
commit bd287d20f5
12 changed files with 247 additions and 144 deletions

View File

@@ -2,6 +2,11 @@ import React, { useEffect, useRef, useState } from "react";
import { View, findNodeHandle } from "react-native";
import Modal from "react-native-modal";
import { GenericActionPayload } from "../../App/common/actions/GenericAction";
import {
AnalyticsEventNameConstants,
AnalyticsMethodNameConstant,
NAVIGATION_ERROR,
} 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";
@@ -49,8 +54,14 @@ const BaseBottomSheetComponent = ({
JSON.stringify(cta),
);
} catch (error) {
// #TODO: Handle the error gracefully using Sentry.
console.error("Error while navigating to deep link:", error);
sendAsAnalyticsEvent({
name: AnalyticsEventNameConstants.HI_INVALID_SCREEN_CTA,
properties: {
methodName:
AnalyticsMethodNameConstant.HANDLE_CTA_CLICK_BOTTOMSHEET,
reason: error?.toString() || NAVIGATION_ERROR,
},
});
}
}
};