Do not require double-nesting of custom TechDocs readers.

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2022-04-15 16:41:28 +02:00
parent 82124f1837
commit ee60ad9ea4
3 changed files with 15 additions and 17 deletions
@@ -97,11 +97,9 @@ export const TechDocsReaderPage = (props: TechDocsReaderPageProps) => {
});
return (
(page as JSX.Element) || (
<TechDocsReaderPageProvider entityRef={entityRef}>
<TechDocsReaderLayout />
</TechDocsReaderPageProvider>
)
<TechDocsReaderPageProvider entityRef={entityRef}>
{(page as JSX.Element) || <TechDocsReaderLayout />}
</TechDocsReaderPageProvider>
);
}