import React from 'react'
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'
import HomePage from './pages/HomePage'
import TagPage from './pages/TagPage'
import TopNav from './components/TopNav'
import TagSidebar from './components/TagSidebar'

const App = () => {
  return (
    <Router>
      <div className="flex flex-col h-screen w-screen">
        <TopNav />
        <div className="flex flex-1">
          <TagSidebar />
          <main className="flex-1 overflow-y-auto p-4">
            <Routes>
              <Route path="/" element={<HomePage />} />
              <Route path="/tags/:tag" element={<TagPage />} />
            </Routes>
          </main>
        </div>
      </div>
    </Router>
  )
}

export default App
