Skip to content

Commit 5c77102

Browse files
authored
Merge pull request #59141 from twilight2294/fixDBIssue
Fix: Empty state screen is not at the middle
2 parents da9797b + ddab1bc commit 5c77102

9 files changed

+12
-9
lines changed

src/pages/Search/EmptySearchView.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ function EmptySearchView({type, hasResults}: EmptySearchViewProps) {
233233

234234
return (
235235
<>
236-
<ScrollView showsVerticalScrollIndicator={false}>
236+
<ScrollView
237+
showsVerticalScrollIndicator={false}
238+
contentContainerStyle={[styles.flexGrow1, styles.flexShrink0]}
239+
>
237240
<EmptyStateComponent
238241
SkeletonComponent={SearchRowSkeleton}
239242
headerMediaType={CONST.EMPTY_STATE_MEDIA.ANIMATION}

src/pages/workspace/categories/WorkspaceCategoriesPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) {
447447
)}
448448

449449
{!hasVisibleCategories && !isLoading && (
450-
<ScrollView>
450+
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.flexShrink0]}>
451451
<EmptyStateComponent
452452
SkeletonComponent={TableListItemSkeleton}
453453
headerMediaType={CONST.EMPTY_STATE_MEDIA.ANIMATION}

src/pages/workspace/companyCards/WorkspaceCompanyCardsFeedAddedEmptyPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function WorkspaceCompanyCardsFeedAddedEmptyPage({handleAssignCard, isDisabledAs
2222
const styles = useThemeStyles();
2323

2424
return (
25-
<ScrollView>
25+
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.flexShrink0]}>
2626
<EmptyStateComponent
2727
SkeletonComponent={CardRowSkeleton}
2828
headerMediaType={CONST.EMPTY_STATE_MEDIA.ILLUSTRATION}

src/pages/workspace/companyCards/WorkspaceCompanyCardsFeedPendingPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function WorkspaceCompanyCardsFeedPendingPage() {
1616
const styles = useThemeStyles();
1717

1818
return (
19-
<ScrollView>
19+
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.flexShrink0]}>
2020
<EmptyStateComponent
2121
SkeletonComponent={CardRowSkeleton}
2222
containerStyles={styles.mt5}

src/pages/workspace/expensifyCard/EmptyCardView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function EmptyCardView({isBankAccountVerified}: EmptyCardViewProps) {
2727
const headerHeight = useEmptyViewHeaderHeight(shouldUseNarrowLayout, isBankAccountVerified);
2828

2929
return (
30-
<ScrollView>
30+
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.flexShrink0]}>
3131
<View style={[{height: windowHeight - headerHeight}, styles.pt5]}>
3232
<EmptyStateComponent
3333
SkeletonComponent={CardRowSkeleton}

src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ function WorkspacePerDiemPage({route}: WorkspacePerDiemPageProps) {
411411
)}
412412

413413
{!hasVisibleSubRates && !isLoading && (
414-
<ScrollView>
414+
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.flexShrink0]}>
415415
<EmptyStateComponent
416416
SkeletonComponent={TableListItemSkeleton}
417417
headerMediaType={CONST.EMPTY_STATE_MEDIA.ANIMATION}

src/pages/workspace/reportFields/ReportFieldsListValuesPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ function ReportFieldsListValuesPage({
328328
<Text style={[styles.sidebarLinkText, styles.optionAlternateText]}>{translate('workspace.reportFields.listInputSubtitle')}</Text>
329329
</View>
330330
{shouldShowEmptyState && (
331-
<ScrollView>
331+
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.flexShrink0]}>
332332
<EmptyStateComponent
333333
title={translate('workspace.reportFields.emptyReportFieldsValues.title')}
334334
subtitle={translate('workspace.reportFields.emptyReportFieldsValues.subtitle')}

src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ function WorkspaceReportFieldsPage({
281281
/>
282282
)}
283283
{shouldShowEmptyState && (
284-
<ScrollView>
284+
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.flexShrink0]}>
285285
<EmptyStateComponent
286286
title={translate('workspace.reportFields.emptyReportFields.title')}
287287
subtitle={translate('workspace.reportFields.emptyReportFields.subtitle')}

src/pages/workspace/tags/WorkspaceTagsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
480480
/>
481481
)}
482482
{!hasVisibleTags && !isLoading && (
483-
<ScrollView>
483+
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.flexShrink0]}>
484484
<EmptyStateComponent
485485
SkeletonComponent={TableListItemSkeleton}
486486
headerMediaType={CONST.EMPTY_STATE_MEDIA.ANIMATION}

0 commit comments

Comments
 (0)