able-baker/app.tsx

25 lines
801 B
TypeScript

import {Route, useRoute, Meta} from ">able/iso-router.tsx";
export default ()=><div>
<h1 class="p-4 bg-red-500 text-white">App</h1>
<nav class="flex gap-10 p-6">
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/404">404</a>
</nav>
<Meta title="default title"/>
<Route path={[]}><p>home page!</p></Route>
<Route path={["about"]}>
<nav class="flex gap-10 p-6">
<a href="/about/more">more</a>
<a href="/about/404">more 404</a>
</nav>
<Route path={[]}><p>About page!</p></Route>
<Route path={["more"]}><p>more!</p></Route>
<Route>
<Meta title="about error!"/>
<span>couldnt find it</span>
</Route>
</Route>
<Route><p>404 :(</p></Route>
</div>;