Skip to content

Commit

Permalink
feat(reference): act-1446 - fixes for build
Browse files Browse the repository at this point in the history
  • Loading branch information
TrofimovAnton85 committed Jul 10, 2024
1 parent 2963848 commit 371872b
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions src/theme/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState, useEffect, useMemo } from "react";
import BrowserOnly from '@docusaurus/BrowserOnly';
import { usePluginData } from "@docusaurus/useGlobalData";
import ldClient from "launchdarkly";
import { useLocation } from "@docusaurus/router";
Expand Down Expand Up @@ -55,23 +56,31 @@ export default function LayoutWrapper({ children }) {
}, []);

return (
<>
{newReferenceEnabled && ldReady && referencePageName ? (
<Layout>
<div className={styles.pageWrapper}>
{children?.props?.children[0]?.type === "aside" && (
<>{children.props.children[0]}</>
)}
<div className={styles.mainContainer}>
<div className={styles.contentWrapper}>
<ParserOpenRPC network={NETWORK_NAMES.metamask} method={referencePageName} />
</div>
</div>
</div>
</Layout>
) : (
<Layout>{children}</Layout>
)}
</>
<BrowserOnly>
{
() => {
return (
<>
{newReferenceEnabled && ldReady && referencePageName ? (
<Layout>
<div className={styles.pageWrapper}>
{children?.props?.children[0]?.type === "aside" && (
<>{children.props.children[0]}</>
)}
<div className={styles.mainContainer}>
<div className={styles.contentWrapper}>
<ParserOpenRPC network={NETWORK_NAMES.metamask} method={referencePageName} />
</div>
</div>
</div>
</Layout>
) : (
<Layout>{children}</Layout>
)}
</>
)
}
}
</BrowserOnly>
);
}

0 comments on commit 371872b

Please sign in to comment.