Skip to content

Commit 89aab17

Browse files
srikarparsiOSBotify
authored andcommitted
Merge pull request #43818 from Expensify/vit-43799
[CP Staging] Remove withPolicyAndFullscreenLoading from WorkspacesListPage (cherry picked from commit df9689f)
1 parent d1b1c54 commit 89aab17

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

src/pages/workspace/WorkspacesListPage.tsx

+16-20
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ import ROUTES from '@src/ROUTES';
4040
import type {Policy as PolicyType, ReimbursementAccount, Report, Session as SessionType} from '@src/types/onyx';
4141
import type * as OnyxCommon from '@src/types/onyx/OnyxCommon';
4242
import {isEmptyObject} from '@src/types/utils/EmptyObject';
43-
import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading';
44-
import type {WithPolicyAndFullscreenLoadingProps} from './withPolicyAndFullscreenLoading';
4543
import WorkspacesListRow from './WorkspacesListRow';
4644

4745
type WorkspaceItem = Required<Pick<MenuItemProps, 'title' | 'disabled'>> &
@@ -82,7 +80,7 @@ type WorkspaceListPageOnyxProps = {
8280
session: OnyxEntry<SessionType>;
8381
};
8482

85-
type WorkspaceListPageProps = WithPolicyAndFullscreenLoadingProps & WorkspaceListPageOnyxProps;
83+
type WorkspaceListPageProps = WorkspaceListPageOnyxProps;
8684

8785
const workspaceFeatures: FeatureListItem[] = [
8886
{
@@ -440,20 +438,18 @@ function WorkspacesListPage({policies, reimbursementAccount, reports, session}:
440438

441439
WorkspacesListPage.displayName = 'WorkspacesListPage';
442440

443-
export default withPolicyAndFullscreenLoading(
444-
withOnyx<WorkspaceListPageProps, WorkspaceListPageOnyxProps>({
445-
policies: {
446-
key: ONYXKEYS.COLLECTION.POLICY,
447-
},
448-
// @ts-expect-error: ONYXKEYS.REIMBURSEMENT_ACCOUNT is conflicting with ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM
449-
reimbursementAccount: {
450-
key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
451-
},
452-
reports: {
453-
key: ONYXKEYS.COLLECTION.REPORT,
454-
},
455-
session: {
456-
key: ONYXKEYS.SESSION,
457-
},
458-
})(WorkspacesListPage),
459-
);
441+
export default withOnyx<WorkspaceListPageProps, WorkspaceListPageOnyxProps>({
442+
policies: {
443+
key: ONYXKEYS.COLLECTION.POLICY,
444+
},
445+
// @ts-expect-error: ONYXKEYS.REIMBURSEMENT_ACCOUNT is conflicting with ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM
446+
reimbursementAccount: {
447+
key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
448+
},
449+
reports: {
450+
key: ONYXKEYS.COLLECTION.REPORT,
451+
},
452+
session: {
453+
key: ONYXKEYS.SESSION,
454+
},
455+
})(WorkspacesListPage);

0 commit comments

Comments
 (0)