-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Copy pathReportScreenWrapper.tsx
28 lines (24 loc) · 1.04 KB
/
ReportScreenWrapper.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import {StackScreenProps} from '@react-navigation/stack';
import React from 'react';
import type {CentralPaneNavigatorParamList} from '@navigation/types';
import ReportScreen from '@pages/home/ReportScreen';
import SCREENS from '@src/SCREENS';
import ReportScreenIDSetter from './ReportScreenIDSetter';
type ReportScreenWrapperProps = StackScreenProps<CentralPaneNavigatorParamList, typeof SCREENS.REPORT>;
function ReportScreenWrapper({route, navigation}: ReportScreenWrapperProps) {
// The ReportScreen without the reportID set will display a skeleton
// until the reportID is loaded and set in the route param
return (
<>
{/* @ts-expect-error Error will be resolved after ReportScreen migration to TypeScript */}
<ReportScreen route={route} />
<ReportScreenIDSetter
route={route}
navigation={navigation}
/>
</>
);
}
ReportScreenWrapper.displayName = 'ReportScreenWrapper';
export default ReportScreenWrapper;
export type {ReportScreenWrapperProps};