diff options
| author | Alberto Duarte (PWC) <alberto.duarte.delgado@pwc.com> | 2023-10-09 17:32:25 +0100 |
|---|---|---|
| committer | Alberto Duarte (PWC) <alberto.duarte.delgado@pwc.com> | 2023-10-09 17:32:25 +0100 |
| commit | 72cf36e033ba794db7982befa45f035b62fa6cd2 (patch) | |
| tree | 3a6fd91976c976afcc8bc1a7cf6fc5c1bf25a791 /app/password-recovery/page.tsx | |
| parent | 66412b7788f49def33fc2143f9e1bd5d25bac261 (diff) | |
Changes
Diffstat (limited to 'app/password-recovery/page.tsx')
| -rw-r--r-- | app/password-recovery/page.tsx | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/app/password-recovery/page.tsx b/app/password-recovery/page.tsx new file mode 100644 index 0000000..6a56d7a --- /dev/null +++ b/app/password-recovery/page.tsx @@ -0,0 +1,44 @@ +'use client'
+import { link } from 'fs'
+import Link from 'next/link'
+import { AuthContext } from '../components/AuthContext'
+import { useContext, useEffect, useState } from 'react';
+
+// import NetflixLogo from '../../../public/images/netflix_logo.svg'
+
+export default function PasswordRecovery() {
+ const user = useContext(AuthContext);
+ const [email, setEmail] = useState('');
+
+ useEffect(() => {
+ // Check if user is authenticated
+ if (!user) {
+ // Redirect or perform any necessary action
+ } else {
+ // User is authenticated, continue with desired logic
+ setEmail(user.email)
+ }
+ }, [user]);
+
+ return (
+ <div className='text-white flex flex-col items-center justify-center h-screen'>
+ <h1 className='text-2xl font-bold mb-6'>Password Recovery</h1>
+ <form className='w-64'>
+ <div className='mb-4'>
+ <label htmlFor='email' className='block font-medium mb-1'>Email:</label>
+ <input type="email" id='email' value={email} className='w-full px-3 py-2 border rounded text-black' onChange={e => setEmail(e.target.value)}/>
+ </div>
+ <button className='w-full py-2 bg-red-600 text-white font-medium rounded'>
+ Recover
+ </button>
+ </form>
+
+ <div className="mt-4">
+ Do you have an account?{' '}
+ <Link href='../login' className="w-[128px] h-[128px] rounded-xl overflow-hidden bg-white">
+ <p>Login</p>
+ </Link>
+ </div>
+ </div>
+ );
+}
|