Skip to content

Commit

Permalink
integrate with frontend (email currently requires manual input)
Browse files Browse the repository at this point in the history
  • Loading branch information
trinity-y committed Nov 10, 2024
1 parent 2bbc974 commit cb83106
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/src/components/pages/CreatePasswordPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import ResponsiveModalWindow from "../common/responsive/ResponsiveModalWindow";
import ResponsiveAuthContainer from "../common/responsive/ResponsiveAuthContainer";
import background from "../assets/background.png";
import backgroundMobile from "../assets/background_mobile.png";
import AuthAPIClient from "../../APIClients/AuthAPIClient";

const CreatePasswordPage = (): React.ReactElement => {
const [showModal, setShowModal] = React.useState(false);
Expand Down Expand Up @@ -57,9 +58,14 @@ const CreatePasswordPage = (): React.ReactElement => {
if (validatePasswords()) {
return;
}
setShowModal(true);

// whoever is handling the email thing needs to pass in the email
AuthAPIClient.setPassword("[email protected]", password).then((resetPasswordResponse)=> {
if (resetPasswordResponse.success) {
setShowModal(true);
}
})

// RESET PASSWORD LOGIC HERE
};
return (
<Flex
Expand Down

0 comments on commit cb83106

Please sign in to comment.