TP-61032 | Default Backpress handling when navigating back to RN quote Page (#10296)
Co-authored-by: Raaj Gopal <raaj.gopal@navi.com>
This commit is contained in:
committed by
GitHub
parent
70715e6014
commit
43e01db652
@@ -8,16 +8,6 @@ import {
|
||||
GenericActionPayload,
|
||||
TargetWidgetPayload,
|
||||
} from "../../actions/GenericAction";
|
||||
import { CtaData } from "../../interface";
|
||||
import { ScreenData } from "../../interface/widgets/screenData/ScreenData";
|
||||
import { ScreenState } from "../../screen/BaseScreen";
|
||||
import { updateValueByKeyPath } from "../../utilities/MiscUtils";
|
||||
import { parseValue } from "../../utilities/SerializerUtil";
|
||||
import { WidgetActionTypes } from "./WidgetActionTypes";
|
||||
import { NativeDeeplinkNavigatorModule } from "../../native-module/NativeModules";
|
||||
import { FinalPatchCallRequestBody } from "../../interface/widgets/widgetData/FooterWithCardWidgetData";
|
||||
import { getQuoteIdFromCta } from "../../utilities/CtaParamsUtils";
|
||||
import { logToSentry } from "../../hooks/useSentryLogging";
|
||||
import {
|
||||
AnalyticsFlowNameConstant,
|
||||
AnalyticsGlobalErrorTypeConstant,
|
||||
@@ -25,6 +15,16 @@ import {
|
||||
AnalyticsModuleNameConstant,
|
||||
} from "../../constants/AnalyticsEventsConstant";
|
||||
import { sendAsGlobalErrorEvent } from "../../hooks/useAnalyticsEvent";
|
||||
import { logToSentry } from "../../hooks/useSentryLogging";
|
||||
import { CtaData } from "../../interface";
|
||||
import { ScreenData } from "../../interface/widgets/screenData/ScreenData";
|
||||
import { FinalPatchCallRequestBody } from "../../interface/widgets/widgetData/FooterWithCardWidgetData";
|
||||
import { NativeDeeplinkNavigatorModule } from "../../native-module/NativeModules";
|
||||
import { ScreenState } from "../../screen/BaseScreen";
|
||||
import { getQuoteIdFromCta } from "../../utilities/CtaParamsUtils";
|
||||
import { updateValueByKeyPath } from "../../utilities/MiscUtils";
|
||||
import { parseValue } from "../../utilities/SerializerUtil";
|
||||
import { WidgetActionTypes } from "./WidgetActionTypes";
|
||||
|
||||
const WidgetActionHandler = {
|
||||
handleWidgetAction: (
|
||||
@@ -145,8 +145,12 @@ const WidgetActionHandler = {
|
||||
).nextPageCta;
|
||||
return updateSumInsuredData(requestData, quoteId!!)
|
||||
.then((response) => {
|
||||
const updatedNextPageCta: CtaData = {
|
||||
...nextPageCta,
|
||||
finish: nextPageCta.finish ? nextPageCta.finish : false,
|
||||
};
|
||||
NativeDeeplinkNavigatorModule.navigateToNaviDeeplinkNavigator(
|
||||
JSON.stringify(nextPageCta)
|
||||
JSON.stringify(updatedNextPageCta)
|
||||
);
|
||||
setScreenData({
|
||||
...screenData,
|
||||
|
||||
@@ -44,7 +44,7 @@ const SumInsuredWidget = ({
|
||||
if (scrollViewRef.current) {
|
||||
scrollViewRef.current.scrollTo({
|
||||
x: SIZE * widgetData?.widgetMetaData?.selectedItemIndex,
|
||||
animated: true,
|
||||
animated: false,
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user