From 2244f2c835aa8fc0c0855197588e5bf81afef832 Mon Sep 17 00:00:00 2001 From: Rob Ellison Date: Fri, 28 Jul 2023 13:26:21 +0000 Subject: [PATCH 1/2] fix: context loading --- components/content/ContentPage.jsx | 7 ++++--- constants/mdxProvider.js | 4 +++- lib/content/loader.js | 8 ++++---- lib/hooks/usePageContent.js | 5 ++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/components/content/ContentPage.jsx b/components/content/ContentPage.jsx index 7b9b8c5c..2ed76406 100644 --- a/components/content/ContentPage.jsx +++ b/components/content/ContentPage.jsx @@ -79,7 +79,7 @@ export function ContentPage({ const Content = () => { if (context && context.file && context.file.endsWith('.etherpad')) { return - } else if (pageContent.content && pageContent.frontmatter) { + } else if (context && pageContent.content && pageContent.frontmatter) { const Page = pageContent.content; return ; } else { @@ -163,12 +163,13 @@ export function ContentPage({ } -
+ {/*
*/} +
<>
-