import { Routes, Route } from "react-router";

import Navbar from "./components/Navbar";
import HomePage from "./pages/HomePage"
import AboutPage from "./pages/AboutPage"
import AuthLayout from "./features/auth/layouts/AuthLayout"
import Login from "./features/auth/components/Login"
import Register from "./features/auth/components/Register"
import PostList from "./features/posts/components/PostList"

function App() {
  return (
    <div className="app">
      <Navbar/>

      <Routes>
        <Route index element={<HomePage />} />
        <Route path="about" element={<AboutPage />} />
        <Route path="Posts" element={<PostList />} />

        <Route element={<AuthLayout />}>
          <Route path="login" element={<Login />} />
          <Route path="register" element={<Register />} />
        </Route>
      </Routes>
    </div>
  )
}

export default App
