Skip to content

Commit

Permalink
Merge pull request #800 from openedx/ahtesham/VAN-1348/replace-getque…
Browse files Browse the repository at this point in the history
…ryparam-with-useparams-hooks

Ahtesham/van 1348/replace getqueryparam with useparams hooks
  • Loading branch information
ahtesham-quraish authored Apr 11, 2023
2 parents 5a715b2 + ec8b256 commit ef66eb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/data/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
6 changes: 3 additions & 3 deletions src/reset-password/ResetPasswordPage.jsx
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ef66eb1

Please sign in to comment.