From a473d795541b904dac07e0e7bfe28493c9232e2f Mon Sep 17 00:00:00 2001 From: Syed Sajjad Hussain Shah <52817156+syedsajjadkazmii@users.noreply.github.com> Date: Fri, 25 Aug 2023 17:48:49 +0500 Subject: [PATCH] fix: forms data persistence issue (#1046) --- src/logistration/Logistration.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/logistration/Logistration.jsx b/src/logistration/Logistration.jsx index 1a74df96..7c6d77ff 100644 --- a/src/logistration/Logistration.jsx +++ b/src/logistration/Logistration.jsx @@ -12,7 +12,7 @@ import { } from '@edx/paragon'; import { ChevronLeft } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; -import { useNavigate } from 'react-router-dom'; +import { Navigate, useNavigate } from 'react-router-dom'; import BaseContainer from '../base-container'; import { clearThirdPartyAuthContextErrorMessage } from '../common-components/data/actions'; @@ -36,6 +36,7 @@ const Logistration = (props) => { } = tpaProviders; const { formatMessage } = useIntl(); const [institutionLogin, setInstitutionLogin] = useState(false); + const [key, setKey] = useState(''); const navigate = useNavigate(); const disablePublicAccountCreation = getConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false; @@ -69,7 +70,7 @@ const Logistration = (props) => { if (tabKey === LOGIN_PAGE) { props.backupRegistrationForm(); } - navigate(updatePathWithQueryParams(tabKey)); + setKey(tabKey); }; const tabTitle = ( @@ -121,6 +122,9 @@ const Logistration = (props) => { ))} + { key && ( + + )}
{selectedPage === LOGIN_PAGE ?