-
Notifications
You must be signed in to change notification settings - Fork 4k
Removing compose.ts #42069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing compose.ts #42069
Changes from all commits
4400aca
7556c60
731031f
ae290e5
6f73081
e520fbc
87c8b5a
5906a1a
a8eb8e8
ee1ff62
f81f094
fdf3e04
8674e0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,36 +1,31 @@ | ||||||||||
| import {Str} from 'expensify-common'; | ||||||||||
| import React, {useEffect} from 'react'; | ||||||||||
| import {View} from 'react-native'; | ||||||||||
| import {withOnyx} from 'react-native-onyx'; | ||||||||||
| import type {OnyxEntry} from 'react-native-onyx'; | ||||||||||
| import {withOnyx} from 'react-native-onyx'; | ||||||||||
| import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; | ||||||||||
| import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; | ||||||||||
| import OfflineWithFeedback from '@components/OfflineWithFeedback'; | ||||||||||
| import {withNetwork} from '@components/OnyxProvider'; | ||||||||||
| import ScrollView from '@components/ScrollView'; | ||||||||||
| import useLocalize from '@hooks/useLocalize'; | ||||||||||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||||||||||
| import compose from '@libs/compose'; | ||||||||||
| import * as CurrencyUtils from '@libs/CurrencyUtils'; | ||||||||||
| import Navigation from '@libs/Navigation/Navigation'; | ||||||||||
| import * as PolicyUtils from '@libs/PolicyUtils'; | ||||||||||
| import {getUnitTranslationKey} from '@libs/WorkspacesSettingsUtils'; | ||||||||||
| import withPolicy from '@pages/workspace/withPolicy'; | ||||||||||
| import type {WithPolicyProps} from '@pages/workspace/withPolicy'; | ||||||||||
| import withPolicy from '@pages/workspace/withPolicy'; | ||||||||||
| import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; | ||||||||||
| import * as BankAccounts from '@userActions/BankAccounts'; | ||||||||||
| import * as Policy from '@userActions/Policy/Policy'; | ||||||||||
| import CONST from '@src/CONST'; | ||||||||||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||||||||||
| import ROUTES from '@src/ROUTES'; | ||||||||||
| import type {Network, ReimbursementAccount, WorkspaceRateAndUnit} from '@src/types/onyx'; | ||||||||||
| import type {ReimbursementAccount, WorkspaceRateAndUnit} from '@src/types/onyx'; | ||||||||||
| import type {Unit} from '@src/types/onyx/Policy'; | ||||||||||
| import {isEmptyObject} from '@src/types/utils/EmptyObject'; | ||||||||||
|
|
||||||||||
| type WorkspaceRateAndUnitPageBaseProps = WithPolicyProps & { | ||||||||||
| // eslint-disable-next-line react/no-unused-prop-types | ||||||||||
| network: OnyxEntry<Network>; | ||||||||||
| }; | ||||||||||
| type WorkspaceRateAndUnitPageBaseProps = WithPolicyProps; | ||||||||||
|
|
||||||||||
| type WorkspaceRateAndUnitOnyxProps = { | ||||||||||
| workspaceRateAndUnit: OnyxEntry<WorkspaceRateAndUnit>; | ||||||||||
|
|
@@ -150,7 +145,7 @@ function WorkspaceRateAndUnitPage(props: WorkspaceRateAndUnitPageProps) { | |||||||||
|
|
||||||||||
| WorkspaceRateAndUnitPage.displayName = 'WorkspaceRateAndUnitPage'; | ||||||||||
|
|
||||||||||
| export default compose( | ||||||||||
| export default withPolicy( | ||||||||||
| withOnyx<WorkspaceRateAndUnitPageProps, WorkspaceRateAndUnitOnyxProps>({ | ||||||||||
| // @ts-expect-error: ONYXKEYS.REIMBURSEMENT_ACCOUNT is conflicting with ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM | ||||||||||
| reimbursementAccount: { | ||||||||||
|
|
@@ -159,7 +154,5 @@ export default compose( | |||||||||
| workspaceRateAndUnit: { | ||||||||||
| key: ONYXKEYS.WORKSPACE_RATE_AND_UNIT, | ||||||||||
| }, | ||||||||||
| }), | ||||||||||
| withPolicy, | ||||||||||
| withNetwork(), | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this not needed in the page?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes its not used anywhere as specified in the props types: App/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/InitialPage.tsx Lines 28 to 31 in 4400aca
also i forgot to remove this type, i just removed it.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually, as i mentioned here #42069 (comment) the whole ( |
||||||||||
| )(WorkspaceRateAndUnitPage); | ||||||||||
| })(WorkspaceRateAndUnitPage), | ||||||||||
| ); | ||||||||||
Uh oh!
There was an error while loading. Please reload this page.