TP-59414 | HandleClick Errors | Bottom Sheet Animation Time (#10373)

This commit is contained in:
Prajjaval Verma
2024-04-10 13:48:48 +05:30
committed by GitHub
parent 8b99ff710f
commit e5840c6c13
5 changed files with 15 additions and 20 deletions

View File

@@ -7,6 +7,7 @@ import { ModalView } from "../../App/common/interface/modals/ModalView";
import { GetModalView } from "../../App/common/modals/modalViewResolver";
import { NativeDeeplinkNavigatorModule } from "../../App/common/native-module/NativeModules";
import styles from "../../App/common/styles/BaseBottomSheetComponentStyles";
import { BOTTOMSHEET_ANIMATION_DURATION } from "../../App/common/constants/NumericalConstants";
const BaseBottomSheetComponent = ({
onBottomSheetAnimationEnd,
@@ -26,7 +27,7 @@ const BaseBottomSheetComponent = ({
setModalVisible(false);
setTimeout(() => {
onClose();
}, 400);
}, BOTTOMSHEET_ANIMATION_DURATION);
};
const handleModalClick = (cta: CtaData) => {
@@ -73,8 +74,8 @@ const BaseBottomSheetComponent = ({
onModalHide={() => onClose()}
animationIn="slideInUp"
animationOut="slideOutDown"
animationInTiming={400}
animationOutTiming={400}
animationInTiming={BOTTOMSHEET_ANIMATION_DURATION}
animationOutTiming={BOTTOMSHEET_ANIMATION_DURATION}
useNativeDriverForBackdrop={true}
style={styles.modal}
>

View File

@@ -49,11 +49,7 @@ const GridCardItemComponent = ({
<TouchableOpacity
activeOpacity={1}
onPress={() => {
{
if (handleClick) {
handleClick(cardItem?.cta!!)!!;
}
}
handleClick && (cardItem?.cta) && handleClick(cardItem?.cta);
}}
style={[styles.cardItem, cardItem.cardStyle]}
>

View File

@@ -19,19 +19,15 @@ const TitleWidget = ({
widgetIndex?: number;
}) => {
const handleTitleClick = () => {
{
if (handleClick) {
handleClick(widgetData?.title?.cta!!)!!;
}
}
handleClick &&
(widgetData?.title?.cta) &&
handleClick(widgetData?.title?.cta);
};
const handleRightTitleClick = () => {
{
if (handleClick) {
handleClick(widgetData?.rightTitle?.cta!!)!!;
}
}
handleClick &&
(widgetData?.rightTitle?.cta) &&
handleClick(widgetData?.rightTitle?.cta);
};
return (