From 90a932aa758fa433cd3d26c63d4820a3a1bc856c Mon Sep 17 00:00:00 2001 From: guitavano Date: Wed, 24 Jul 2024 13:09:05 -0300 Subject: [PATCH] Tavano/one more fix on pagesections (#741) * Release [0.52.3] * send false to asResolved function --- deno.json | 2 +- website/mod.ts | 2 +- website/pages/Page.tsx | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/deno.json b/deno.json index 9f2fc4ff3..bf11c67ee 100644 --- a/deno.json +++ b/deno.json @@ -36,5 +36,5 @@ "jsx": "react-jsx", "jsxImportSource": "preact" }, - "version": "0.52.2" + "version": "0.52.3" } diff --git a/website/mod.ts b/website/mod.ts index bbc90ad21..96e344d14 100644 --- a/website/mod.ts +++ b/website/mod.ts @@ -259,7 +259,7 @@ export const onBeforeResolveProps = < const newRoutes: T = { ...props, pageSections: props.pageSections?.map((section) => - asResolved(section, true) + asResolved(section, false) ), errorPage: props.errorPage ? asResolved(props.errorPage, true) diff --git a/website/pages/Page.tsx b/website/pages/Page.tsx index 69ad7fd15..9da708d4a 100644 --- a/website/pages/Page.tsx +++ b/website/pages/Page.tsx @@ -162,10 +162,7 @@ export const loader = async ( const pageSections = await Promise.all( (ctx.pageSections || [])?.map(async (section) => { - if (isDeferred(section)) { - return await section() as Section; - } - return section; + return await ctx.get(section); }), );