mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 20:53:24 +10:00
Move fname/firstName and lname/lastName renaming in thunk functions
This commit is contained in:
parent
59f5e08897
commit
f1b7a2235d
2 changed files with 2 additions and 8 deletions
|
|
@ -172,9 +172,8 @@ class EditListingWizard extends Component {
|
|||
}
|
||||
|
||||
handlePayoutSubmit(values) {
|
||||
const { fname: firstName, lname: lastName, ...rest } = values;
|
||||
this.props
|
||||
.onPayoutDetailsSubmit({ firstName, lastName, ...rest })
|
||||
.onPayoutDetailsSubmit(values)
|
||||
.then(() => {
|
||||
this.setState({ showPayoutDetails: false });
|
||||
this.props.onManageDisableScrolling('EditListingWizard.payoutModal', false);
|
||||
|
|
|
|||
|
|
@ -76,11 +76,6 @@ export const PayoutPreferencesPageComponent = props => {
|
|||
message = <FormattedMessage id="PayoutPreferencesPage.stripeNotConnected" />;
|
||||
}
|
||||
|
||||
const handlePayoutDetailsSubmit = values => {
|
||||
const { fname: firstName, lname: lastName, ...rest } = values;
|
||||
onPayoutDetailsFormSubmit({ firstName, lastName, ...rest });
|
||||
};
|
||||
|
||||
const showForm =
|
||||
currentUserLoaded && (payoutDetailsSaveInProgress || payoutDetailsSaved || !stripeConnected);
|
||||
const form = showForm ? (
|
||||
|
|
@ -91,7 +86,7 @@ export const PayoutPreferencesPageComponent = props => {
|
|||
submitButtonText={intl.formatMessage({ id: 'PayoutPreferencesPage.submitButtonText' })}
|
||||
createStripeAccountError={createStripeAccountError}
|
||||
onChange={onPayoutDetailsFormChange}
|
||||
onSubmit={handlePayoutDetailsSubmit}
|
||||
onSubmit={onPayoutDetailsFormSubmit}
|
||||
/>
|
||||
) : null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue