import React from 'react';
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
import { HomePage } from './presentation/pages/HomePage.jsx';
import { MangaDetailPage } from './presentation/pages/MangaDetailPage.jsx';
import { AddMangaPage } from './presentation/pages/AddMangaPage.jsx';

function App() {
  return (
    <BrowserRouter>
      <Routes>
        <Route path="/" element={<HomePage />} />
        <Route path="/manga/:slug" element={<MangaDetailPage />} />
        <Route path="/add" element={<AddMangaPage />} />
        <Route path="*" element={<Navigate to="/" replace />} />
      </Routes>
    </BrowserRouter>
  );
}

export default App;