diff options
author | Biswakalyan Bhuyan <biswa@surgot.in> | 2024-08-01 20:38:02 +0530 |
---|---|---|
committer | Biswakalyan Bhuyan <biswa@surgot.in> | 2024-08-01 20:38:02 +0530 |
commit | c0c91b2b8fe3b49865ea0f4cf96dc5b5a59927c6 (patch) | |
tree | ba0bcdc4a51938f0bbe003d99ffadaae3ee8cfe4 /panel/src | |
parent | d781e2a7911325bf088df3b631f6ee4528f79237 (diff) | |
download | admin-panel-c0c91b2b8fe3b49865ea0f4cf96dc5b5a59927c6.tar.gz admin-panel-c0c91b2b8fe3b49865ea0f4cf96dc5b5a59927c6.tar.bz2 admin-panel-c0c91b2b8fe3b49865ea0f4cf96dc5b5a59927c6.zip |
added a reset button
Diffstat (limited to 'panel/src')
-rw-r--r-- | panel/src/pages/LoginPage.jsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/panel/src/pages/LoginPage.jsx b/panel/src/pages/LoginPage.jsx index f763325..41169cb 100644 --- a/panel/src/pages/LoginPage.jsx +++ b/panel/src/pages/LoginPage.jsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { useNavigate } from 'react-router-dom'; // Import useNavigate +import { useNavigate } from 'react-router-dom'; import { signInWithEmailAndPassword } from 'firebase/auth'; import { auth } from '../firebase'; @@ -7,7 +7,7 @@ const LoginPage = () => { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [error, setError] = useState(''); - const navigate = useNavigate(); // Get the navigation function + const navigate = useNavigate(); const handleLogin = async () => { console.log('Attempting login...'); @@ -53,7 +53,8 @@ const LoginPage = () => { /> </div> {error && <p className="text-danger">{error}</p>} - <button onClick={handleLogin} className="btn btn-primary w-full">Login</button> + <button onClick={handleLogin} className="btn btn-primary w-full mb-2">Login</button> + <button onClick={() => navigate('/reset')} className="btn btn-secondary w-full">Reset Password</button> </div> </div> ); |