Skip to content

Commit

Permalink
Move WithReportOrNotFoundOnyxProps to WithReportOrNotFoundProps
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony-MK authored Oct 7, 2024
1 parent bc41599 commit 2d75c3f
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/pages/home/report/withReportOrNotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,7 @@ import type SCREENS from '@src/SCREENS';
import type * as OnyxTypes from '@src/types/onyx';
import {isEmptyObject} from '@src/types/utils/EmptyObject';

type WithReportOrNotFoundOnyxProps = {
/** Metadata of the report currently being looked at */
reportMetadata: OnyxEntry<OnyxTypes.ReportMetadata>;

/** The policies which the user has access to */
policies: OnyxCollection<OnyxTypes.Policy>;

/** Beta features list */
betas: OnyxEntry<OnyxTypes.Beta[]>;

/** Indicated whether the report data is loading */
isLoadingReportData: OnyxEntry<boolean>;
};

type WithReportOrNotFoundProps = WithReportOrNotFoundOnyxProps & {
type WithReportOrNotFoundProps = {
route:
| RouteProp<PrivateNotesNavigatorParamList, typeof SCREENS.PRIVATE_NOTES.EDIT>
| RouteProp<ReportDescriptionNavigatorParamList, typeof SCREENS.REPORT_DESCRIPTION_ROOT>
Expand All @@ -50,6 +36,18 @@ type WithReportOrNotFoundProps = WithReportOrNotFoundOnyxProps & {

/** The report currently being looked at */
report: OnyxTypes.Report;

/** Metadata of the report currently being looked at */
reportMetadata: OnyxEntry<OnyxTypes.ReportMetadata>;

/** The policies which the user has access to */
policies: OnyxCollection<OnyxTypes.Policy>;

/** Beta features list */
betas: OnyxEntry<OnyxTypes.Beta[]>;

/** Indicated whether the report data is loading */
isLoadingReportData: OnyxEntry<boolean>;
};

export default function (
Expand Down

0 comments on commit 2d75c3f

Please sign in to comment.