mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Fix bugs crashed when refresh EditListingPage:
Cause: current user is null when the EditListing page got reloaded. Solve: ensure current user and then pass in ID
This commit is contained in:
parent
84f272eaad
commit
fa9cb85755
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ import {
|
|||
LISTING_PAGE_PARAM_TYPE_NEW,
|
||||
LISTING_PAGE_PARAM_TYPES,
|
||||
} from '../../util/urlHelpers';
|
||||
import { ensureListing } from '../../util/data';
|
||||
import { ensureListing, ensureCurrentUser } from '../../util/data';
|
||||
import { PayoutDetailsForm } from '../../forms';
|
||||
import { Modal, NamedRedirect, Tabs } from '../../components';
|
||||
|
||||
|
|
@ -288,7 +288,7 @@ class EditListingWizard extends Component {
|
|||
className={css.payoutDetails}
|
||||
inProgress={fetchInProgress}
|
||||
createStripeAccountError={errors ? errors.createStripeAccountError : null}
|
||||
currentUserId={this.props.currentUser.id}
|
||||
currentUserId={ensureCurrentUser(this.props.currentUser).id}
|
||||
onChange={onPayoutDetailsFormChange}
|
||||
onSubmit={this.handlePayoutSubmit}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue