import { useState } from 'react';
import { useAuth } from '@/hooks/useAuth';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import { Rss, Mail, Lock } from 'lucide-react';
import { toast } from 'sonner';
import { Navigate } from 'react-router-dom';
const Auth = () => {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [loading, setLoading] = useState(false);
const { user, signIn, signUp } = useAuth();
// Redirect if user is already authenticated
if (user) {
return