fix: remove depricated getQueryParams

Replace getQueryParams function with getAllPossibleQueryParams function

VAN-1348
This commit is contained in:
ahtesham-quraish
2023-03-29 11:58:43 +05:00
committed by Blue
parent 5a715b2fb5
commit ec8b256852
2 changed files with 4 additions and 4 deletions

View File

@@ -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'];

View File

@@ -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);