import React, { useState } from 'react'
import LoginForm from './LoginForm'
import RegisterForm from './RegisterForm'

function AuthScreen() {
  const [mode, setMode] = useState('login') // 'login' or 'register'

  if (mode === 'register') {
    return <RegisterForm onSwitchToLogin={() => setMode('login')} />
  }

  return <LoginForm onSwitchToRegister={() => setMode('register')} />
}

export default AuthScreen

