fix(server): merge competing PluginMiddleware handlers together (#1545)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { Handlers, PageProps } from "$fresh/server.ts";
|
||||
import { PluginMiddlewareState } from "../../utils/route-plugin.ts";
|
||||
|
||||
export const handler: Handlers = {
|
||||
async GET(_req, ctx) {
|
||||
const resp = await ctx.render();
|
||||
return resp;
|
||||
},
|
||||
};
|
||||
|
||||
export default function Home(props: PageProps<unknown, PluginMiddlewareState>) {
|
||||
const value = props.state.num;
|
||||
return (
|
||||
<div>
|
||||
<h1>{value}</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user