|
1 | 1 | import Str from 'expensify-common/lib/str';
|
2 | 2 | import React, {useEffect} from 'react';
|
3 | 3 | import {View} from 'react-native';
|
4 |
| -import {withOnyx} from 'react-native-onyx'; |
5 | 4 | import type {OnyxEntry} from 'react-native-onyx';
|
| 5 | +import {withOnyx} from 'react-native-onyx'; |
6 | 6 | import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton';
|
7 | 7 | import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
|
8 | 8 | import OfflineWithFeedback from '@components/OfflineWithFeedback';
|
9 | 9 | import {withNetwork} from '@components/OnyxProvider';
|
10 | 10 | import ScrollView from '@components/ScrollView';
|
11 | 11 | import useLocalize from '@hooks/useLocalize';
|
12 | 12 | import useThemeStyles from '@hooks/useThemeStyles';
|
13 |
| -import compose from '@libs/compose'; |
14 | 13 | import * as CurrencyUtils from '@libs/CurrencyUtils';
|
15 | 14 | import Navigation from '@libs/Navigation/Navigation';
|
16 | 15 | import {getUnitTranslationKey} from '@libs/WorkspacesSettingsUtils';
|
17 |
| -import withPolicy from '@pages/workspace/withPolicy'; |
18 | 16 | import type {WithPolicyProps} from '@pages/workspace/withPolicy';
|
| 17 | +import withPolicy from '@pages/workspace/withPolicy'; |
19 | 18 | import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections';
|
20 | 19 | import * as BankAccounts from '@userActions/BankAccounts';
|
21 | 20 | import * as Policy from '@userActions/Policy';
|
@@ -150,16 +149,16 @@ function WorkspaceRateAndUnitPage(props: WorkspaceRateAndUnitPageProps) {
|
150 | 149 |
|
151 | 150 | WorkspaceRateAndUnitPage.displayName = 'WorkspaceRateAndUnitPage';
|
152 | 151 |
|
153 |
| -export default compose( |
154 |
| - withOnyx<WorkspaceRateAndUnitPageProps, WorkspaceRateAndUnitOnyxProps>({ |
155 |
| - // @ts-expect-error: ONYXKEYS.REIMBURSEMENT_ACCOUNT is conflicting with ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM |
156 |
| - reimbursementAccount: { |
157 |
| - key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, |
158 |
| - }, |
159 |
| - workspaceRateAndUnit: { |
160 |
| - key: ONYXKEYS.WORKSPACE_RATE_AND_UNIT, |
161 |
| - }, |
162 |
| - }), |
163 |
| - withPolicy, |
164 |
| - withNetwork(), |
165 |
| -)(WorkspaceRateAndUnitPage); |
| 152 | +export default withNetwork()( |
| 153 | + withPolicy( |
| 154 | + withOnyx<WorkspaceRateAndUnitPageProps, WorkspaceRateAndUnitOnyxProps>({ |
| 155 | + // @ts-expect-error: ONYXKEYS.REIMBURSEMENT_ACCOUNT is conflicting with ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM |
| 156 | + reimbursementAccount: { |
| 157 | + key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, |
| 158 | + }, |
| 159 | + workspaceRateAndUnit: { |
| 160 | + key: ONYXKEYS.WORKSPACE_RATE_AND_UNIT, |
| 161 | + }, |
| 162 | + })(WorkspaceRateAndUnitPage), |
| 163 | + ), |
| 164 | +); |
0 commit comments