update 7/5
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
import { render } from 'preact';
|
||||
import { LocationProvider, Router, Route } from 'preact-iso';
|
||||
import { render } from "preact";
|
||||
import { LocationProvider, Router, Route } from "preact-iso";
|
||||
|
||||
import { Header } from './components/Header.jsx';
|
||||
import { Home } from './pages/Home/index.jsx';
|
||||
import { NotFound } from './pages/_404.jsx';
|
||||
import './style.css';
|
||||
import { Home } from "./pages/Home/index.jsx";
|
||||
import ProductDetail from "./pages/product/ProductPage.jsx";
|
||||
import { NotFound } from "./pages/_404.jsx";
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
<LocationProvider>
|
||||
<Header />
|
||||
<main>
|
||||
<Router>
|
||||
<Route path="/" component={Home} />
|
||||
<Route default component={NotFound} />
|
||||
</Router>
|
||||
</main>
|
||||
</LocationProvider>
|
||||
);
|
||||
return (
|
||||
<LocationProvider>
|
||||
<main>
|
||||
<Router>
|
||||
<Route path="/" component={Home} />
|
||||
<Route path="/detail" component={ProductDetail} />
|
||||
<Route default component={NotFound} />
|
||||
</Router>
|
||||
</main>
|
||||
</LocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
render(<App />, document.getElementById('app'));
|
||||
render(<App />, document.getElementById("root"));
|
||||
|
||||
Reference in New Issue
Block a user