Skip to content
Closed
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
6 changes: 5 additions & 1 deletion src/components/MoneyRequestConfirmationListFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {useOnyx} from 'react-native-onyx';
import type {ValueOf} from 'type-fest';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';
import {convertToDisplayString} from '@libs/CurrencyUtils';
import DistanceRequestUtils from '@libs/DistanceRequestUtils';
Expand Down Expand Up @@ -255,6 +256,8 @@ function MoneyRequestConfirmationListFooter({

const [currentUserLogin] = useOnyx(ONYXKEYS.SESSION, {selector: (session) => session?.email, canBeMissing: true});

const {shouldUseNarrowLayout} = useResponsiveLayout();

// A flag and a toggler for showing the rest of the form fields
const [shouldExpandFields, toggleShouldExpandFields] = useReducer((state) => !state, false);

Expand Down Expand Up @@ -750,7 +753,7 @@ function MoneyRequestConfirmationListFooter({

const receiptThumbnailContent = useMemo(
() => (
<View style={[styles.moneyRequestImage, styles.expenseViewImageSmall]}>
<View style={[styles.moneyRequestImage, !shouldUseNarrowLayout && styles.expenseViewImageSmall]}>
{isLocalFile && Str.isPDF(receiptFilename) ? (
<PressableWithoutFocus
onPress={() => {
Expand Down Expand Up @@ -817,6 +820,7 @@ function MoneyRequestConfirmationListFooter({
styles.cursorDefault,
styles.h100,
styles.flex1,
shouldUseNarrowLayout,
isLocalFile,
receiptFilename,
translate,
Expand Down