From ec8b256852e44ac122af574306964c656b43f9d3 Mon Sep 17 00:00:00 2001 From: ahtesham-quraish Date: Wed, 29 Mar 2023 11:58:43 +0500 Subject: [PATCH] fix: remove depricated getQueryParams Replace getQueryParams function with getAllPossibleQueryParams function VAN-1348 --- src/data/constants.js | 2 +- src/reset-password/ResetPasswordPage.jsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/constants.js b/src/data/constants.js index eb1a196269..70332a71cc 100644 --- a/src/data/constants.js +++ b/src/data/constants.js @@ -35,4 +35,4 @@ export const INVALID_NAME_REGEX = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{ // Query string parameters that can be passed to LMS to manage // things like auto-enrollment upon login and registration. -export const AUTH_PARAMS = ['course_id', 'enrollment_action', 'course_mode', 'email_opt_in', 'purchase_workflow', 'next', 'save_for_later', 'register_for_free']; +export const AUTH_PARAMS = ['course_id', 'enrollment_action', 'course_mode', 'email_opt_in', 'purchase_workflow', 'next', 'save_for_later', 'register_for_free', 'track', 'is_account_recovery']; diff --git a/src/reset-password/ResetPasswordPage.jsx b/src/reset-password/ResetPasswordPage.jsx index 2341a6d812..bc020d7a6e 100644 --- a/src/reset-password/ResetPasswordPage.jsx +++ b/src/reset-password/ResetPasswordPage.jsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; -import { getConfig, getQueryParameters } from '@edx/frontend-platform'; +import { getConfig } from '@edx/frontend-platform'; import { useIntl } from '@edx/frontend-platform/i18n'; import { Form, @@ -21,7 +21,7 @@ import { PasswordField } from '../common-components'; import { LETTER_REGEX, LOGIN_PAGE, NUMBER_REGEX, RESET_PAGE, } from '../data/constants'; -import { updatePathWithQueryParams, windowScrollTo } from '../data/utils'; +import { getAllPossibleQueryParams, updatePathWithQueryParams, windowScrollTo } from '../data/utils'; import { resetPassword, validateToken } from './data/actions'; import { FORM_SUBMISSION_ERROR, PASSWORD_RESET_ERROR, PASSWORD_VALIDATION_ERROR, TOKEN_STATE, @@ -129,7 +129,7 @@ const ResetPasswordPage = (props) => { new_password1: newPassword, new_password2: confirmPassword, }; - const params = getQueryParameters(); + const params = getAllPossibleQueryParams(); props.resetPassword(formPayload, props.token, params); } else { setErrorCode(FORM_SUBMISSION_ERROR);