From 5d690bede12cf08aac422e5af375a95ee2b30e66 Mon Sep 17 00:00:00 2001 From: Harsh Mangalam <57381638+harshmangalam@users.noreply.github.com> Date: Wed, 15 Nov 2023 19:02:57 +0530 Subject: [PATCH] docs: fix get params from ctx instead of props (#2040) --- docs/latest/concepts/partials.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/latest/concepts/partials.md b/docs/latest/concepts/partials.md index 09829171..96077e62 100644 --- a/docs/latest/concepts/partials.md +++ b/docs/latest/concepts/partials.md @@ -82,7 +82,7 @@ The code for such a page (excluding styling) might look like this: ```tsx routes/docs/[id].tsx export default defineRoute(async (req, ctx) => { - const content = await loadContent(props.params.id); + const content = await loadContent(ctx.params.id); return (
@@ -114,7 +114,7 @@ export const config: RouteConfig = { }; export default defineRoute(async (req, ctx) => { - const content = await loadContent(props.params.id); + const content = await loadContent(ctx.params.id); // Only render the new content return (