@@ -8,34 +8,30 @@ import {clearErrors} from '@userActions/FormActions';
88import ONYXKEYS from '@src/ONYXKEYS' ;
99import Confirmation from './subSteps/Confirmation' ;
1010
11- type CountryProps = {
11+ type CountryFullStepProps = {
1212 /** Handles back button press */
1313 onBackButtonPress : ( ) => void ;
1414
15+ /** Array of step names */
16+ stepNames : readonly string [ ] ;
17+
1518 /** Handles submit button press */
1619 onSubmit : ( ) => void ;
1720
1821 /** ID of current policy */
1922 policyID : string | undefined ;
20-
21- /** Array of step names */
22- stepNames ?: readonly string [ ] ;
2323} ;
2424
25- type CountryStepProps = {
25+ type CountrySubStepProps = {
2626 /** ID of current policy */
2727 policyID : string | undefined ;
2828} & SubStepProps ;
2929
30- const bodyContent : Array < ComponentType < CountryStepProps > > = [ Confirmation ] ;
30+ const bodyContent : Array < ComponentType < CountrySubStepProps > > = [ Confirmation ] ;
3131
32- function Country ( { onBackButtonPress, onSubmit , policyID , stepNames } : CountryProps ) {
32+ function CountryFullStep ( { onBackButtonPress, stepNames , onSubmit , policyID } : CountryFullStepProps ) {
3333 const { translate} = useLocalize ( ) ;
3434
35- const submit = ( ) => {
36- onSubmit ( ) ;
37- } ;
38-
3935 const {
4036 componentToRender : SubStep ,
4137 isEditing,
@@ -44,7 +40,7 @@ function Country({onBackButtonPress, onSubmit, policyID, stepNames}: CountryProp
4440 prevScreen,
4541 moveTo,
4642 goToTheLastStep,
47- } = useSubStep < CountryStepProps > ( { bodyContent, startFrom : 0 , onFinished : submit } ) ;
43+ } = useSubStep < CountrySubStepProps > ( { bodyContent, startFrom : 0 , onFinished : onSubmit } ) ;
4844
4945 const handleBackButtonPress = ( ) => {
5046 clearErrors ( ONYXKEYS . FORMS . REIMBURSEMENT_ACCOUNT_FORM ) ;
@@ -62,7 +58,7 @@ function Country({onBackButtonPress, onSubmit, policyID, stepNames}: CountryProp
6258
6359 return (
6460 < InteractiveStepWrapper
65- wrapperID = { Country . displayName }
61+ wrapperID = { CountryFullStep . displayName }
6662 handleBackButtonPress = { handleBackButtonPress }
6763 headerTitle = { translate ( 'countryStep.confirmCurrency' ) }
6864 stepNames = { stepNames }
@@ -78,6 +74,6 @@ function Country({onBackButtonPress, onSubmit, policyID, stepNames}: CountryProp
7874 ) ;
7975}
8076
81- Country . displayName = 'Country' ;
77+ CountryFullStep . displayName = 'Country' ;
8278
83- export default Country ;
79+ export default CountryFullStep ;
0 commit comments