From 82e9ab2c9f4c0b4e8effcfb22dba0687da9c6ad6 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Fri, 27 Sep 2024 15:01:42 +0200 Subject: [PATCH 1/2] integrate AccessOrNotFoundWrapper into WorkspaceInvoicesPage --- .../invoices/WorkspaceInvoicesPage.tsx | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx index 40a8239b9ab1..d42f9a857a12 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx @@ -5,6 +5,7 @@ import useLocalize from '@hooks/useLocalize'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useThemeStyles from '@hooks/useThemeStyles'; import type {FullScreenNavigatorParamList} from '@navigation/types'; +import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; import CONST from '@src/CONST'; import type SCREENS from '@src/SCREENS'; @@ -18,21 +19,27 @@ function WorkspaceInvoicesPage({route}: WorkspaceInvoicesPageProps) { const styles = useThemeStyles(); const {shouldUseNarrowLayout} = useResponsiveLayout(); return ( - - {(hasVBA?: boolean, policyID?: string) => ( - - {!hasVBA && policyID && } - {hasVBA && policyID && } - - )} - + + {(hasVBA?: boolean, policyID?: string) => ( + + {!hasVBA && policyID && } + {hasVBA && policyID && } + + )} + + ); } From acde545615476f49351dbfd9b9a57a84c62f67b0 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Tue, 1 Oct 2024 11:12:34 +0200 Subject: [PATCH 2/2] fix --- .../workspace/invoices/WorkspaceInvoicesPage.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx index 5544e5264c86..bbe19e63a1b5 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx +++ b/src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx @@ -14,7 +14,6 @@ import WorkspaceInvoicesVBAView from './WorkspaceInvoicesVBAView'; import WorkspaceInvoiceVBASection from './WorkspaceInvoiceVBASection'; type WorkspaceInvoicesPageProps = StackScreenProps; - function WorkspaceInvoicesPage({route}: WorkspaceInvoicesPageProps) { const {translate} = useLocalize(); const styles = useThemeStyles(); @@ -33,11 +32,13 @@ function WorkspaceInvoicesPage({route}: WorkspaceInvoicesPageProps) { shouldSkipVBBACall={false} route={route} > - - {policyID && } - {!hasVBA && policyID && } - {hasVBA && policyID && } - + {(hasVBA?: boolean, policyID?: string) => ( + + {policyID && } + {!hasVBA && policyID && } + {hasVBA && policyID && } + + )} );