FIX: Navigation from ListItems;
REFACTOR: Format all files;
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
import { ToggleButton } from "../Input/Button";
|
||||
import {
|
||||
LogIn as LogInIcon,
|
||||
User as UserIcon,
|
||||
} from "lucide-react";
|
||||
import { LogIn as LogInIcon, User as UserIcon } from "lucide-react";
|
||||
import LoginForm from "./LoginForm";
|
||||
import RegisterForm from "./RegisterForm";
|
||||
import ForgotPasswordForm from "./ForgotPasswordForm";
|
||||
@@ -93,7 +90,10 @@ const AuthModal: React.FC<AuthModalProps> = ({ onClose }) => {
|
||||
>
|
||||
✕
|
||||
</button>
|
||||
<div id="login-methods" className="w-full flex flex-row items-center justify-evenly">
|
||||
<div
|
||||
id="login-methods"
|
||||
className="w-full flex flex-row items-center justify-evenly"
|
||||
>
|
||||
{authSwitch()}
|
||||
</div>
|
||||
</div>
|
||||
@@ -104,4 +104,4 @@ const AuthModal: React.FC<AuthModalProps> = ({ onClose }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default AuthModal;
|
||||
export default AuthModal;
|
||||
|
||||
@@ -4,6 +4,7 @@ import Button from "../Input/Button";
|
||||
|
||||
interface ForgotPasswordProps {
|
||||
email?: string;
|
||||
general?: string;
|
||||
}
|
||||
|
||||
interface SubmitProps {
|
||||
@@ -51,7 +52,9 @@ const ForgotPasswordForm: React.FC<SubmitProps> = ({ onSubmit }) => {
|
||||
|
||||
if (!response.ok) {
|
||||
const data = await response.json();
|
||||
throw new Error(data.message || "An error has occurred while resetting");
|
||||
throw new Error(
|
||||
data.message || "An error has occurred while resetting"
|
||||
);
|
||||
} else {
|
||||
confirmPasswordReset();
|
||||
}
|
||||
@@ -68,8 +71,10 @@ const ForgotPasswordForm: React.FC<SubmitProps> = ({ onSubmit }) => {
|
||||
return (
|
||||
<div className="mb-2">
|
||||
<div className="flex flex-col items-center p-[2.5rem]">
|
||||
<h1 className="text-white text-[1.5em] font-[800] md:text-[1.75em] lg:text-[2em]">Forgot Password</h1>
|
||||
<div className="mt-10 bg-white/10 backdrop-blur-md p-6 rounded-xl shadow-lg w-full max-w-[10em] min-w-[14em] border border-white/10 sm:max-w-[16em] md:max-w-[18em] lg:max-w-[20em]">
|
||||
<h1 className="text-white text-[1.5em] font-[800] md:text-[1.75em] lg:text-[2em]">
|
||||
Forgot Password
|
||||
</h1>
|
||||
<div className="mt-10 bg-white/10 backdrop-blur-md p-6 rounded-xl shadow-lg w-full max-w-[10em] min-w-[14em] border border-white/10 sm:max-w-[16em] md:max-w-[18em] lg:max-w-[20em]">
|
||||
<form
|
||||
onSubmit={handleSubmit}
|
||||
id="forgot-password-form"
|
||||
@@ -93,7 +98,9 @@ const ForgotPasswordForm: React.FC<SubmitProps> = ({ onSubmit }) => {
|
||||
placeholder="Enter your email"
|
||||
value={email}
|
||||
onChange={handleEmailChange}
|
||||
extraClasses={`w-full mb-[1.5em] p-[0.5rem] ${errors.email ? "border-red-500" : ""}`}
|
||||
extraClasses={`w-full mb-[1.5em] p-[0.5rem] ${
|
||||
errors.email ? "border-red-500" : ""
|
||||
}`}
|
||||
/>
|
||||
</div>
|
||||
<Button type="submit">Send Link</Button>
|
||||
|
||||
@@ -102,9 +102,10 @@ const LoginForm: React.FC<SubmitProps> = ({ onSubmit, onForgotPassword }) => {
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-col items-center p-10">
|
||||
<h1 className="flex flex-col text-white text-[1.5em] font-[800] md:text-[1.75em] lg:text-[2em]">Login</h1>
|
||||
<h1 className="flex flex-col text-white text-[1.5em] font-[800] md:text-[1.75em] lg:text-[2em]">
|
||||
Login
|
||||
</h1>
|
||||
<div className="mt-10 bg-white/10 backdrop-blur-md p-6 rounded-xl shadow-lg w-full max-w-[10em] min-w-[14em] border border-white/10 sm:max-w-[16em] md:max-w-[18em] lg:max-w-[20em]">
|
||||
|
||||
<form
|
||||
onSubmit={handleSubmit}
|
||||
id="login-form"
|
||||
|
||||
@@ -20,7 +20,9 @@ export default function GoogleLogin() {
|
||||
alt="Google logo"
|
||||
className="w-[2em] h-[2em] mr-2"
|
||||
/>
|
||||
<span className="flex-grow text-[0.6em] lx:text-[0.75em] 2lg:text-[1em]">Sign in with Google</span>
|
||||
<span className="flex-grow text-[0.6em] lx:text-[0.75em] 2lg:text-[1em]">
|
||||
Sign in with Google
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user