Files
bestpc/src/index.tsx

23 lines
608 B
TypeScript
Raw Normal View History

2025-05-07 16:03:56 +07:00
import { render } from "preact";
import { LocationProvider, Router, Route } from "preact-iso";
2025-04-29 11:36:07 +07:00
2025-05-07 16:03:56 +07:00
import { Home } from "./pages/Home/index.jsx";
import ProductDetail from "./pages/product/ProductPage.jsx";
import { NotFound } from "./pages/_404.jsx";
2025-04-29 11:36:07 +07:00
export function App() {
2025-05-07 16:03:56 +07:00
return (
<LocationProvider>
<main>
<Router>
<Route path="/" component={Home} />
<Route path="/detail" component={ProductDetail} />
<Route default component={NotFound} />
</Router>
</main>
</LocationProvider>
);
2025-04-29 11:36:07 +07:00
}
2025-05-07 16:03:56 +07:00
render(<App />, document.getElementById("root"));