fix(server): make LayoutProps generic (#1592)

This commit is contained in:
Reed von Redwitz
2023-08-05 22:27:13 +02:00
committed by GitHub
parent cc0e2cb2ec
commit 1fb7f3bea9
5 changed files with 55 additions and 32 deletions
+5 -1
View File
@@ -1,8 +1,12 @@
import { LayoutProps } from "$fresh/server.ts";
import { LayoutState } from "./_middleware.ts";
export default function RootLayout({ Component }: LayoutProps) {
export default function RootLayout(
{ Component, state }: LayoutProps<unknown, LayoutState>,
) {
return (
<div class="root-layout">
{state.something === "it works" ? "it works\n" : "it doesn't work\n"}
<Component />
</div>
);