eno/example/app.tsx

38 lines
1.2 KiB
TypeScript
Raw Normal View History

import React from "react";
2023-04-05 20:05:21 -04:00
import * as Iso from "@eno/iso";
2023-04-22 12:08:58 -04:00
const Comp = React.lazy(()=>import("./deep/component.tsx"));
2023-04-30 15:11:54 -04:00
Iso.Boot(
()=>
{
return <div class="p-4 font-sans">
<Iso.Meta.Metas title="Main Page!"/>
<nav class="p-4">
<a class="text-red-500" href="/">Home</a>
<a href="/about">About</a>
</nav>
<h1 class="my-2 font(bold serif) text(3xl)">Title!!!!!!</h1>
<h2>suspended:</h2>
<React.Suspense fallback={<div>Loading!</div>}>
<Comp/>
</React.Suspense>
<Iso.Switch>
<Iso.Case value="page">
<Iso.Switch>
<Iso.Case value="about-us">
<>
<Iso.Meta.Metas title="About US"/>
About us!
</>
</Iso.Case>
<Iso.Case default>sorry no page</Iso.Case>
</Iso.Switch>
</Iso.Case>
<Iso.Case value="lol/idk">lol/idk</Iso.Case>
<Iso.Case default><p>404!</p></Iso.Case>
</Iso.Switch>
</div>;
}
);