import { render } from "preact";
import { LocationProvider, Router, Route } from "preact-iso";
import { ProductDetail } from "./pages/productDetail/ProductDetail";
import { Buildpc } from "./pages/buildpc/Buildpc";
import { CompareBuildpc } from "./pages/buildpc/CompareBuildpc";
import { DetailBuildpc } from "./pages/buildpc/DetailBuildpc";

export function App() {
  return (
    <LocationProvider>
      <main>
        <Router>
          <Route path="/product-detail" component={ProductDetail} />
          <Route path="/buildpc" component={Buildpc} />
          <Route path="/buildpc/compare" component={CompareBuildpc} />
          <Route path="/buildpc/detail" component={DetailBuildpc} />
        </Router>
      </main>
    </LocationProvider>
  );
}

render(<App />, document.getElementById("root"));
