feat: Allow passing props to renderNotFound method (#1310)

This commit is contained in:
Kamil Ogórek
2023-06-16 17:12:01 +02:00
committed by GitHub
parent 12fc103daa
commit d5a8692b78
5 changed files with 23 additions and 6 deletions
+3 -1
View File
@@ -36,7 +36,9 @@ export const handler: Handlers = {
async GET(req, ctx) {
const blogpost = await fetchBlogpost(ctx.params.slug);
if (!blogpost) {
return ctx.renderNotFound();
return ctx.renderNotFound({
custom: "prop",
});
}
return ctx.render({ blogpost });
},