From 8d5be0f0d406476829e08d2e3c3c1e82faacd430 Mon Sep 17 00:00:00 2001 From: Khennee Date: Sat, 7 Dec 2024 23:40:20 +0800 Subject: [PATCH] change password page --- frontend/src/components/Header.tsx | 8 ++- frontend/src/main.tsx | 8 +++ frontend/src/pages/ChangePassword.tsx | 88 +++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 frontend/src/pages/ChangePassword.tsx diff --git a/frontend/src/components/Header.tsx b/frontend/src/components/Header.tsx index 135c0c7..d7a3a33 100644 --- a/frontend/src/components/Header.tsx +++ b/frontend/src/components/Header.tsx @@ -43,6 +43,10 @@ const Header = () => { logout(); }; + const handleChangePassword = () => ( + navigate("/changepassword") + ) + useEffect(() => { const handleClickOutside = (event: MouseEvent) => { if ( @@ -144,10 +148,10 @@ const Header = () => { - Reset Password + Change Password { const { appLoading }: LoadingContextType = useLoading(); @@ -107,7 +108,14 @@ const Main = () => { path="/rules" element={} /> + + } + /> + + {/* ADMIN ROUTES */} }> diff --git a/frontend/src/pages/ChangePassword.tsx b/frontend/src/pages/ChangePassword.tsx new file mode 100644 index 0000000..aa99a9b --- /dev/null +++ b/frontend/src/pages/ChangePassword.tsx @@ -0,0 +1,88 @@ +import Header from "../components/Header"; +import { useNavigate } from "react-router-dom"; +const ChangePassword = () => { + const navigate = useNavigate() + + const handleCancelButton = () => { + navigate("/homepage") + } + + const handleSubmitButton = () => { + //pass + } + + return ( +
+ +
+
+
+ +
+ +
+ +
+

+ Current Password +

+ +
+ +
+

+ New Password +

+ +
+ +
+

+ Confirm Password +

+ +
+ +
+ +
+ +
+ + + + + +
+ +
+ ); +}; + +export default ChangePassword;