-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[TS migration] Migrate 'ReimbursementAccount' page to TypeScript #37214
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
Changes from all commits
8fb16bc
06d3b9a
9f40e79
3125cbe
08a5d4e
8c18188
1ca6fb0
ceb9fab
646a2e5
d13da54
67f3da4
093fe8f
ee1949b
3907ee7
a3dbead
2a416fd
997c4ed
55630d6
0743b0e
bd53388
0148be1
6b82c5d
7f85aba
3929cc8
1862ea3
1bf4824
f569304
37bbc00
680c3e8
1d9571a
6dab98a
ee0cff1
2c8ec25
5cf516e
40251dd
1fa4868
d3d38d1
322ddc0
f4943c9
6c49728
c1dd9b7
c7076f3
302b4c4
3bd3b3b
dea796d
9086168
7f1ec9d
7023d38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ import type {NativeSyntheticEvent, StyleProp, TextInputFocusEventData, View, Vie | |
| import type {Place} from 'react-native-google-places-autocomplete'; | ||
| import type {MaybePhraseKey} from '@libs/Localize'; | ||
| import type Locale from '@src/types/onyx/Locale'; | ||
| import type {Address} from '@src/types/onyx/PrivatePersonalDetails'; | ||
|
|
||
| type CurrentLocationButtonProps = { | ||
| /** Callback that is called when the button is clicked */ | ||
|
|
@@ -12,18 +13,6 @@ type CurrentLocationButtonProps = { | |
| isDisabled?: boolean; | ||
| }; | ||
|
|
||
| type RenamedInputKeysProps = { | ||
| street: string; | ||
| street2: string; | ||
| city: string; | ||
| state: string; | ||
| lat?: string; | ||
| lng?: string; | ||
| zipCode: string; | ||
| address?: string; | ||
| country?: string; | ||
| }; | ||
|
|
||
| type OnPressProps = { | ||
| address: string; | ||
| lat: number; | ||
|
|
@@ -61,7 +50,7 @@ type AddressSearchProps = { | |
| defaultValue?: string; | ||
|
|
||
| /** A callback function when the value of this field has changed */ | ||
| onInputChange?: (value: string | number | RenamedInputKeysProps | StreetValue, key?: string) => void; | ||
| onInputChange?: (value: string | number | Address | StreetValue, key?: string) => void; | ||
|
|
||
| /** A callback function when an address has been auto-selected */ | ||
| onPress?: (props: OnPressProps) => void; | ||
|
|
@@ -79,7 +68,7 @@ type AddressSearchProps = { | |
| predefinedPlaces?: Place[] | null; | ||
|
|
||
| /** A map of inputID key names */ | ||
| renamedInputKeys?: RenamedInputKeysProps; | ||
| renamedInputKeys?: Address; | ||
|
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. Is there a reason to replace the type here? I find a little confusing to sometimes use the Address type as an address and sometimes as this key map.
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. the reason for replacing that it turned out that both types are the same so there is no reason to keep them both |
||
|
|
||
| /** Maximum number of characters allowed in search input */ | ||
| maxInputLength?: number; | ||
|
|
@@ -96,4 +85,4 @@ type AddressSearchProps = { | |
|
|
||
| type IsCurrentTargetInsideContainerType = (event: FocusEvent | NativeSyntheticEvent<TextInputFocusEventData>, containerRef: RefObject<View | HTMLElement>) => boolean; | ||
|
|
||
| export type {CurrentLocationButtonProps, AddressSearchProps, RenamedInputKeysProps, IsCurrentTargetInsideContainerType, StreetValue}; | ||
| export type {CurrentLocationButtonProps, AddressSearchProps, IsCurrentTargetInsideContainerType, StreetValue}; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,15 @@ | ||
| import PropTypes from 'prop-types'; | ||
| import React from 'react'; | ||
| import CompleteVerification from './CompleteVerification/CompleteVerification'; | ||
|
|
||
| const propTypes = { | ||
| type ACHContractStepProps = { | ||
| /** Goes to the previous step */ | ||
| onBackButtonPress: PropTypes.func.isRequired, | ||
| onBackButtonPress: () => void; | ||
| }; | ||
|
|
||
| function ACHContractStep({onBackButtonPress}) { | ||
| function ACHContractStep({onBackButtonPress}: ACHContractStepProps) { | ||
| return <CompleteVerification onBackButtonPress={onBackButtonPress} />; | ||
| } | ||
|
|
||
| ACHContractStep.propTypes = propTypes; | ||
| ACHContractStep.displayName = 'ACHContractStep'; | ||
|
|
||
| export default ACHContractStep; | ||
|
kubabutkiewicz marked this conversation as resolved.
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.