fix(server): make LayoutProps generic (#1592)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { MiddlewareHandlerContext } from "$fresh/server.ts";
|
||||
|
||||
export type LayoutState = {
|
||||
something: string;
|
||||
};
|
||||
|
||||
export const handler = (
|
||||
_req: Request,
|
||||
ctx: MiddlewareHandlerContext<LayoutState>,
|
||||
) => {
|
||||
ctx.state.something = "it works";
|
||||
return ctx.next();
|
||||
};
|
||||
Reference in New Issue
Block a user