fix: unable to resubmit form (#719)

by replacing url history user will again redirect to dashboard instead progressive profile page.

VAN-1214
This commit is contained in:
Mubbshar Anwar
2022-12-23 21:41:30 +05:00
committed by GitHub
parent 661914b0db
commit 82857db236

View File

@@ -71,6 +71,7 @@ const ProgressiveProfiling = (props) => {
const extendedProfile = props.location.state.optionalFields.extended_profile;
const handleSubmit = (e) => {
e.preventDefault();
window.history.replaceState(props.location.state, null, '');
const authenticatedUser = getAuthenticatedUser();
const payload = { ...values, extendedProfile: [] };
if (Object.keys(extendedProfile).length > 0) {
@@ -95,6 +96,7 @@ const ProgressiveProfiling = (props) => {
const handleSkip = (e) => {
e.preventDefault();
window.history.replaceState(props.location.state, null, '');
setOpenDialog(true);
sendTrackEvent('edx.bi.welcome.page.skip.link.clicked');
};