%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/emergentqj/actioncivile/pre-auth/.4cc3a2e1590a4463a5f392ddcc26929e/static/js/components/
Upload File :
Create Path :
Current File : /home/emergentqj/actioncivile/pre-auth/.4cc3a2e1590a4463a5f392ddcc26929e/static/js/components/ResetPassword.jsx

import React, { useEffect } from "react";
import PropTypes, { func } from "prop-types";
import ForgotPasswordContainer from "containers/ForgotPassword/ForgotPasswordContainer";

function ResetPassword({
  resetPasswordWithToken,
  checkToken,
}) {
  useEffect(() => {
    const urlParams = new URLSearchParams(window.location.search);
    const token = urlParams.get("token");
    if (token) {
      resetPasswordWithToken(token);
      checkToken(token);
    } // Otherwise it goes to the forgot password page
  }, []); // eslint-disable-line react-hooks/exhaustive-deps

  return <ForgotPasswordContainer />;
}

ResetPassword.propTypes = {
  resetPasswordWithToken: func.isRequired,
  checkToken: PropTypes.func.isRequired,
};

export default ResetPassword;

Zerion Mini Shell 1.0