diff --git a/frontend/src/components/Auth/AuthModal.tsx b/frontend/src/components/Auth/AuthModal.tsx index f794346..0453d17 100644 --- a/frontend/src/components/Auth/AuthModal.tsx +++ b/frontend/src/components/Auth/AuthModal.tsx @@ -22,6 +22,27 @@ const AuthModal: React.FC = ({ onClose }) => { }, 3500); }; + const authSwitch = () => { + + const formMap: { [key: string]: JSX.Element} = { + Login: , + Register: , + Forgot: + }; + return formMap[selectedTab] ||
Please select a valid option
; + {/* + if (selectedTab === "Login") { + return + } else if (selectedTab === "Register") { + return + } else if (selectedTab === "Forgot") { + return + } else + return
Please select a valid icon
+ */} + + } + return ( <> {/*Background Blur*/} @@ -87,11 +108,12 @@ const AuthModal: React.FC = ({ onClose }) => { ✕ - {selectedTab === "Login" ? ( - - ) : ( - - )} + <> + {authSwitch()} + + + + diff --git a/frontend/src/components/Auth/ForgotPasswordForm.tsx b/frontend/src/components/Auth/ForgotPasswordForm.tsx index 0656307..ce0a739 100644 --- a/frontend/src/components/Auth/ForgotPasswordForm.tsx +++ b/frontend/src/components/Auth/ForgotPasswordForm.tsx @@ -6,7 +6,11 @@ interface ForgotPasswordProps { email?: string; } -const ForgotPasswordForm: React.FC = () => { +interface SubmitProps { + onSubmit: () => void; + } + +const ForgotPasswordForm: React.FC = ( {onSubmit} ) => { const [email, setEmail] = useState(""); const [errors, setErrors] = useState({});