From 7bcb7cb8160bcff5e3299f6f480c4da0df0d1c0f Mon Sep 17 00:00:00 2001 From: Seung Park Date: Wed, 1 May 2024 16:29:43 -0400 Subject: [PATCH] DOP-4566: set init values for tabs and tab selectors during build time (#1080) --- src/components/DocumentBody.js | 53 +++++++++++++---------- src/components/DocumentBodyPreview.js | 39 +++++++++-------- src/components/RootProvider.js | 24 +++++------ src/components/Tabs/TabSelectors.js | 2 +- src/components/Tabs/index.js | 21 +++------- src/components/Tabs/tab-context.js | 60 ++++++++++++++++++++++++++- src/layouts/index.js | 7 +++- src/layouts/preview-layout.js | 1 - 8 files changed, 134 insertions(+), 73 deletions(-) diff --git a/src/components/DocumentBody.js b/src/components/DocumentBody.js index da5f1c682..e814161b8 100644 --- a/src/components/DocumentBody.js +++ b/src/components/DocumentBody.js @@ -23,6 +23,7 @@ import DocsLandingSD from './StructuredData/DocsLandingSD'; import BreadcrumbSchema from './StructuredData/BreadcrumbSchema'; import { InstruqtProvider } from './Instruqt/instruqt-context'; import { SuspenseHelper } from './SuspenseHelper'; +import { TabProvider } from './Tabs/tab-context'; // lazy load the unified footer to improve page load speed const LazyFooter = lazy(() => import('./Footer')); @@ -103,28 +104,30 @@ const DocumentBody = (props) => { return ( <> - - - - -
- -
-
-
-
-
+ + + + + +
+ +
+
+
+
+
+
{!isInPresentationMode && (