import { useState } from 'react' import Head from 'next/head' import LoginForm from '../components/LoginForm' import GoogleButton from '../components/GoogleButton' export default function Home() { const [isLoading, setIsLoading] = useState(false) const [error, setError] = useState('') const handleLogin = async (email, password) => { setIsLoading(true) setError('') try { // Simulate API call await new Promise(resolve => setTimeout(resolve, 1500)) // Here you would make actual API call console.log('Login with:', email, password) alert('Login successful!') } catch (err) { setError('Invalid email or password') } finally { setIsLoading(false) } } const handleGoogleLogin = async () => { setIsLoading(true) setError('') try { // Redirect to Google OAuth window.location.href = '/api/auth/google' } catch (err) { setError('Failed to initiate Google login') setIsLoading(false) } } return ( <> Sign in - Google Style
Built with anycoder
G

Sign in to your account

Or{' '} create a new account

Or continue with

By signing in, you agree to our{' '} Terms {' '} and{' '} Privacy Policy

) }