docs: fix syntax error on "Error Pages" page (#668)

This commit is contained in:
Vitor L Cavalcanti
2022-08-31 10:32:34 +00:00
committed by GitHub
parent 6077bb65b7
commit 54d6d67519
+5 -5
View File
@@ -36,15 +36,15 @@ This can be achieved with `ctx.renderNotFound`.
import { h } from "preact";
import { Handlers, PageProps } from "$fresh/server.ts";
export handler: Handlers = {
export const handler: Handlers = {
async GET(req, ctx) {
const blogpost = await fetchBlogpost(ctx.params.slug)
const blogpost = await fetchBlogpost(ctx.params.slug);
if (!blogpost) {
return ctx.renderNotFound();
}
return ctx.render({ blogpost })
}
}
return ctx.render({ blogpost });
},
};
export default function BlogpostPage({ data }) {
return (