diff --git a/src/components/DevDocTemplate/index.tsx b/src/components/DevDocTemplate/index.tsx index 3929d65fe..12f14935a 100644 --- a/src/components/DevDocTemplate/index.tsx +++ b/src/components/DevDocTemplate/index.tsx @@ -52,7 +52,12 @@ const DevDocTemplate: FC = (props) => { location, pageContext: { namePageIdMap }, } = props; - const homePagePaths = ['/', '/docs', '/docs/introduction', '/docs/introduction/']; + const homePagePaths = [ + '/', + '/docs', + '/docs/introduction', + '/docs/introduction/', + ]; const isHomePage = homePagePaths.includes(location?.pathname); useEffect(() => { @@ -321,75 +326,78 @@ const DevDocTemplate: FC = (props) => { ); }; - const renderDocTemplate = () => ( - <> - {renderSearch()} -
- { - setShowSearch(true); - if (!isMaxMobileResolution) setLeftNavOpen(false); - }} - /> -
- {isAskDocsPage ? ( -
- + const renderDocTemplate = () => + navContent ? ( + <> + {renderSearch()} +
+ { + setShowSearch(true); + if (!isMaxMobileResolution) setLeftNavOpen(false); + }} + />
- ) : ( -
-
- - {shouldShowRightNav && ( -
- -
- )} + {isAskDocsPage ? ( +
+
-
- )} - - ); + ) : ( +
+
+ + {shouldShowRightNav && ( +
+ +
+ )} +
+
+ )} + + ) : null; const renderPlayGround = () => { return ;