From e36c343cbfa34a055ec84eb699809e671b7d4eb4 Mon Sep 17 00:00:00 2001 From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com> Date: Tue, 11 Feb 2025 17:19:32 +0530 Subject: [PATCH] [ forget modal ] --- src/Layouts/DefaultLayout.tsx | 2 +- src/Pages/ForgetPassword.tsx | 65 ++++++++++++++++++++++++++++ src/Pages/Login.tsx | 17 +++++--- src/components/MainFrame.tsx | 2 +- src/components/ui/password-input.tsx | 2 +- 5 files changed, 78 insertions(+), 10 deletions(-) create mode 100644 src/Pages/ForgetPassword.tsx diff --git a/src/Layouts/DefaultLayout.tsx b/src/Layouts/DefaultLayout.tsx index 2e63eae..3d2e95e 100644 --- a/src/Layouts/DefaultLayout.tsx +++ b/src/Layouts/DefaultLayout.tsx @@ -43,7 +43,7 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { - + navigate('/profile')} > diff --git a/src/Pages/ForgetPassword.tsx b/src/Pages/ForgetPassword.tsx new file mode 100644 index 0000000..e0be6bc --- /dev/null +++ b/src/Pages/ForgetPassword.tsx @@ -0,0 +1,65 @@ +import { Field, Input, Stack, Text } from "@chakra-ui/react"; +import { Button } from "../components/ui/button"; +import { + DialogBody, + DialogContent, + DialogFooter, + DialogHeader, + DialogRoot, + DialogTitle, + DialogTrigger, +} from "../components/ui/dialog"; +function ForgetPassword() { + return ( + + + + Forgot password? + + + + + + + Forgot Password + + + + + + + + Please Enter Email Address + + + + + + + + + + + ); +} + +export default ForgetPassword; diff --git a/src/Pages/Login.tsx b/src/Pages/Login.tsx index 541ec13..0287d06 100644 --- a/src/Pages/Login.tsx +++ b/src/Pages/Login.tsx @@ -1,4 +1,4 @@ -import { Center, HStack, Image, Input, Text, VStack } from "@chakra-ui/react"; +import { Box, Center, HStack, Image, Input, Text, VStack } from "@chakra-ui/react"; import axios from "axios"; import { useContext, useState } from "react"; import { useForm } from "react-hook-form"; @@ -11,6 +11,7 @@ import { Field } from "../components/ui/field"; import { Toaster } from "../components/ui/toaster"; import { PasswordInput } from "../components/ui/password-input"; import { useNavigate } from "react-router-dom"; +import ForgetPassword from "./ForgetPassword"; interface FormValues { mobileNumber: number; @@ -103,14 +104,14 @@ const Login = () => { -
- + { LOGIN - + { w={"100%"} invalid={!!errors.password} errorText={errors.password?.message} + mb={2} > { Login - Forgot password - + + -
+
diff --git a/src/components/MainFrame.tsx b/src/components/MainFrame.tsx index 2646c63..285d3b9 100644 --- a/src/components/MainFrame.tsx +++ b/src/components/MainFrame.tsx @@ -13,7 +13,7 @@ interface MainFrameProps { const MainFrame: FC = ({ children }) => { return ( - + (