From 4d9e19e84d42748b722c97e48ac77f5316132e52 Mon Sep 17 00:00:00 2001 From: Sam Cook Date: Wed, 20 Sep 2023 02:25:15 -0500 Subject: [PATCH] docs update --- docs/src/pages/docs.page.tsx | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/docs/src/pages/docs.page.tsx b/docs/src/pages/docs.page.tsx index 1d2e224e..9f4aef6e 100644 --- a/docs/src/pages/docs.page.tsx +++ b/docs/src/pages/docs.page.tsx @@ -91,8 +91,7 @@ root ), the path would be example.com/foo/bar. If you want the directory to be ignored, prefix it with two underscores (e.g., __foo). In that case, - the route will just be - example.com/bar. + the route will just be example.com/bar. @@ -574,35 +573,24 @@ export async function loader({ c }: AppDataFunctionArgs) { code={` import { CssImports, - getMatchingPathData, rootOutlet, hwyDev, ClientEntryScript, getDefaultBodyProps, + renderRoot, } from 'hwy' app.all('*', async (c, next) => { - const activePathData = await getMatchingPathData({ c }) - - if (activePathData.fetchResponse) { - return activePathData.fetchResponse - } - - if (!activePathData.matchingPaths?.length) { - return await next() - } - - return c.html( - \`\` + - ( + return await renderRoot(c, next, async ({ activePathData }) => { + return ( @@ -614,8 +602,8 @@ app.all('*', async (c, next) => { {await rootOutlet({ - activePathData, c, + activePathData, fallbackErrorBoundary: () => { return
Something went wrong!
}, @@ -623,7 +611,7 @@ app.all('*', async (c, next) => { ) - ) + } }) `} />