Update current user having orders after creating enquiry

This makes the enquiry tx page show the possible missing email
verification modal right away.
This commit is contained in:
Kimmo Puputti 2018-03-14 11:03:29 +02:00
parent 09bba2d328
commit 90040910f9
2 changed files with 5 additions and 2 deletions

View file

@ -199,8 +199,10 @@ class TopbarComponent extends Component {
);
const isNotWhitelisted = !whitelistedPaths.includes(newLocation.pathname);
const showReminder = infoMissing && isNotWhitelisted && hasListingsOrOrders && showOnPathChange;
// Show reminder
if (infoMissing && isNotWhitelisted && hasListingsOrOrders && showOnPathChange) {
if (showReminder) {
this.setState({ showMissingInformationReminder: true });
}
}

View file

@ -5,7 +5,7 @@ import { addMarketplaceEntities } from '../../ducks/marketplaceData.duck';
import { denormalisedResponseEntities } from '../../util/data';
import { TRANSITION_ENQUIRE } from '../../util/types';
import { LISTING_PAGE_PENDING_APPROVAL_VARIANT } from '../../util/urlHelpers';
import { fetchCurrentUser } from '../../ducks/user.duck';
import { fetchCurrentUser, fetchCurrentUserHasOrdersSuccess } from '../../ducks/user.duck';
const { UUID } = sdkTypes;
@ -167,6 +167,7 @@ export const sendEnquiry = (listingId, message) => (dispatch, getState, sdk) =>
// Send the message to the created transaction
return sdk.messages.send({ transactionId, content: message }).then(() => {
dispatch(sendEnquirySuccess());
dispatch(fetchCurrentUserHasOrdersSuccess(true));
return transactionId;
});
})