import './App.css'
import { LoginPage } from './pages/Login'
import { SignUp } from './pages/SignUp'
import { AuthLayout } from './layouts/AuthLayout'
import { Routes, Route, Navigate } from 'react-router'
import Dashboard from './pages/Dashboard'
import RootRedirect from './pages/RootRedirect'
import { TaskButton } from './components/Card'

function App() {

  return (
    <Routes>
      <Route path="/" element={<RootRedirect />} />

      <Route path="/auth" element={
        <AuthLayout className="flex min-h-svh flex-col items-center justify-center bg-muted text-foreground" />
      }>
        <Route path="login" element={<LoginPage />} />
        <Route path="signup" element={<SignUp />} />
      </Route>

      <Route path="/dashboard" element={
        <Dashboard />
      } />
      <Route path="/card" element={
        <TaskButton />
      } />
      <Route path="*" element={<Navigate to="/auth/login" replace />} />
    </Routes>
  )
}

export default App
