Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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