feat: support async app template (#1626)

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
This commit is contained in:
Marvin Hagemeister
2023-08-14 14:52:48 +02:00
committed by GitHub
co-authored by Asher Gomez
parent 563b61d849
commit ba67d895ce
14 changed files with 217 additions and 158 deletions
@@ -0,0 +1,15 @@
import { LayoutContext } from "$fresh/server.ts";
import { delay } from "$std/async/delay.ts";
export default async function AsyncLayout(
req: Request,
ctx: LayoutContext,
) {
await delay(10);
return (
<div class="layout">
<p>Async layout</p>
<ctx.Component />
</div>
);
}