Skip to content

Commit

Permalink
IOU - Back button unresponsive on touches on IOU details page in offline
Browse files Browse the repository at this point in the history
  • Loading branch information
ikevin127 committed Dec 11, 2023
1 parent 715e2b2 commit e7ef4bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/ReportHeaderSkeletonView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import SkeletonViewContentLoader from './SkeletonViewContentLoader';

type ReportHeaderSkeletonViewProps = {
shouldAnimate?: boolean;
onBackButtonPress?: () => void;
};

function ReportHeaderSkeletonView({shouldAnimate = true}: ReportHeaderSkeletonViewProps) {
function ReportHeaderSkeletonView({shouldAnimate = true, onBackButtonPress = () => {}}: ReportHeaderSkeletonViewProps) {
const theme = useTheme();
const styles = useThemeStyles();
const {translate} = useLocalize();
Expand All @@ -27,7 +28,7 @@ function ReportHeaderSkeletonView({shouldAnimate = true}: ReportHeaderSkeletonVi
<View style={[styles.appContentHeaderTitle, !isSmallScreenWidth && styles.pl5]}>
{isSmallScreenWidth && (
<PressableWithFeedback
onPress={() => {}}
onPress={onBackButtonPress}
style={[styles.LHNToggle]}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
accessibilityLabel={translate('common.back')}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function HeaderView(props) {
>
<View style={[styles.appContentHeaderTitle, !isSmallScreenWidth && !isLoading && styles.pl5]}>
{isLoading ? (
<ReportHeaderSkeletonView />
<ReportHeaderSkeletonView onBackButtonPress={props.onNavigationMenuButtonClicked} />
) : (
<>
{isSmallScreenWidth && (
Expand Down

0 comments on commit e7ef4bd

Please sign in to comment.