generated from agiledev-students-fall2023/generic-project-repository
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from agiledev-students-fall2023/charlotte
add password recovery page frontend
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React, { useRef } from 'react'; // Import React and useRef | ||
import {FormInputs} from '../../components/form/formInput'; | ||
import FormBtn from '../../components/form/formBtn'; | ||
import AuthHeader from '../Authenticate/authHeader'; | ||
import NavBar from "../../components/common/navBar"; | ||
import LeftBtn from "../../components/common/leftBtn"; | ||
|
||
const ResetPassword = ({ loginMessage, handleLogin, handleGuest }) => { | ||
const formRef = useRef(null); // Assuming you have useRef imported from 'react' | ||
const fields = ["newPassword", "confirmPassword"]; // Fields for the form | ||
|
||
return ( | ||
<> | ||
<div className="flex flex-col"> | ||
<NavBar relative="1"> | ||
<LeftBtn /> | ||
</NavBar> | ||
<div className="flex flex-col w-[80%] max-w-[30rem] mx-auto justify-center items-center bg-gray-100 pt-4 mt-24"> | ||
<AuthHeader header="Reset Password" message={loginMessage} /> | ||
<div className="w-full max-w-xs"> | ||
<form ref={formRef} onSubmit={handleLogin} className="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4"> | ||
<FormInputs fields={fields} /> | ||
<div className='flex justify-center mt-4'> | ||
<FormBtn type="submit" value="Reset Password" /> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default ResetPassword; |