diff --git a/src/pages/Auth.tsx b/src/pages/Auth.tsx index b39e5fc..fbe6598 100644 --- a/src/pages/Auth.tsx +++ b/src/pages/Auth.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { useNavigate } from 'react-router-dom'; +import { useNavigate, Link } from 'react-router-dom'; import { useAuth } from '@/hooks/useAuth'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; @@ -7,6 +7,7 @@ import { Label } from '@/components/ui/label'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { toast } from '@/hooks/use-toast'; import { z } from 'zod'; +import { ArrowLeft } from 'lucide-react'; const emailSchema = z.string().email('Invalid email address'); const passwordSchema = z.string().min(6, 'Password must be at least 6 characters'); @@ -71,66 +72,76 @@ export default function Auth() { return (
- - - {isLogin ? 'Login' : 'Sign Up'} - - {isLogin ? 'Enter your credentials to access your account' : 'Create a new account to get started'} - - - -
- {!isLogin && ( +
+ {/* Back to Home Button */} + + + + + + + {isLogin ? 'Login' : 'Sign Up'} + + {isLogin ? 'Enter your credentials to access your account' : 'Create a new account to get started'} + + + + + {!isLogin && ( +
+ + setName(e.target.value)} + placeholder="Your name" + className="border-2" + /> +
+ )}
- + setName(e.target.value)} - placeholder="Your name" + id="email" + type="email" + value={email} + onChange={(e) => setEmail(e.target.value)} + placeholder="your@email.com" className="border-2" />
- )} -
- - setEmail(e.target.value)} - placeholder="your@email.com" - className="border-2" - /> +
+ + setPassword(e.target.value)} + placeholder="••••••••" + className="border-2" + /> +
+ + + +
+
-
- - setPassword(e.target.value)} - placeholder="••••••••" - className="border-2" - /> -
- - - -
- -
- - + + +
); }