feat: support route layouts via _layout.tsx (#1506)

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
Michael Gearhardt
2023-07-26 11:49:08 +02:00
committed by GitHub
co-authored by Marvin Hagemeister
parent 18857ea052
commit 1ed93cec88
27 changed files with 397 additions and 3 deletions
@@ -0,0 +1,9 @@
import { LayoutProps } from "$fresh/server.ts";
export default function FooLayout({ Component }: LayoutProps) {
return (
<div class="foo-layout">
<Component />
</div>
);
}
+7
View File
@@ -0,0 +1,7 @@
export default function BarPage() {
return (
<div class="bar-page">
/foo/bar page
</div>
);
}
@@ -0,0 +1,7 @@
export default function FooPage() {
return (
<div class="foo-page">
/foo index page
</div>
);
}