From 82857db236801ba7f4cd4e33a6684434067ce4a7 Mon Sep 17 00:00:00 2001 From: Mubbshar Anwar <78487564+mubbsharanwar@users.noreply.github.com> Date: Fri, 23 Dec 2022 21:41:30 +0500 Subject: [PATCH] fix: unable to resubmit form (#719) by replacing url history user will again redirect to dashboard instead progressive profile page. VAN-1214 --- src/welcome/ProgressiveProfiling.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/welcome/ProgressiveProfiling.jsx b/src/welcome/ProgressiveProfiling.jsx index 3a0d152b..3e2a91d9 100644 --- a/src/welcome/ProgressiveProfiling.jsx +++ b/src/welcome/ProgressiveProfiling.jsx @@ -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'); };