Skip to content

Commit ef66eb1

Browse files
Merge pull request #800 from openedx/ahtesham/VAN-1348/replace-getqueryparam-with-useparams-hooks
Ahtesham/van 1348/replace getqueryparam with useparams hooks
2 parents 5a715b2 + ec8b256 commit ef66eb1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/data/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ export const INVALID_NAME_REGEX = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{
3535

3636
// Query string parameters that can be passed to LMS to manage
3737
// things like auto-enrollment upon login and registration.
38-
export const AUTH_PARAMS = ['course_id', 'enrollment_action', 'course_mode', 'email_opt_in', 'purchase_workflow', 'next', 'save_for_later', 'register_for_free'];
38+
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'];

src/reset-password/ResetPasswordPage.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useEffect, useState } from 'react';
22
import { connect } from 'react-redux';
33

4-
import { getConfig, getQueryParameters } from '@edx/frontend-platform';
4+
import { getConfig } from '@edx/frontend-platform';
55
import { useIntl } from '@edx/frontend-platform/i18n';
66
import {
77
Form,
@@ -21,7 +21,7 @@ import { PasswordField } from '../common-components';
2121
import {
2222
LETTER_REGEX, LOGIN_PAGE, NUMBER_REGEX, RESET_PAGE,
2323
} from '../data/constants';
24-
import { updatePathWithQueryParams, windowScrollTo } from '../data/utils';
24+
import { getAllPossibleQueryParams, updatePathWithQueryParams, windowScrollTo } from '../data/utils';
2525
import { resetPassword, validateToken } from './data/actions';
2626
import {
2727
FORM_SUBMISSION_ERROR, PASSWORD_RESET_ERROR, PASSWORD_VALIDATION_ERROR, TOKEN_STATE,
@@ -129,7 +129,7 @@ const ResetPasswordPage = (props) => {
129129
new_password1: newPassword,
130130
new_password2: confirmPassword,
131131
};
132-
const params = getQueryParameters();
132+
const params = getAllPossibleQueryParams();
133133
props.resetPassword(formPayload, props.token, params);
134134
} else {
135135
setErrorCode(FORM_SUBMISSION_ERROR);

0 commit comments

Comments
 (0)