Просмотр исходного кода

chore(dev-hub) Added banner to Entropy Pages

Aditya Arora 1 месяц назад
Родитель
Сommit
56a3e387d7

+ 4 - 4
apps/developer-hub/content/docs/entropy/chainlist.mdx

@@ -8,12 +8,12 @@ import { EntropyTable } from "../../../src/components/EntropyTable";
 
 ## Mainnets
 
-<InfoBox variant="warning">
+<Callout type="warning">
   <div>
     The fees for mainnet are dynamically set. Always use the on-chain method
     `entropy.getFeeV2()` to get the current fee.
   </div>
-</InfoBox>
+</Callout>
 
 The following tables shows the total fees payable when using the **default provider**.
 Note that the fees shown below will vary over time with prevailing gas prices on each chain.
@@ -32,12 +32,12 @@ Entropy callbacks the consumer as part of this transaction.
 
 ## Testnets
 
-<InfoBox variant="info">
+<Callout type="info">
   <div>
     The fees for testnets are kept deliberately low and different from the
     mainnet fees.
   </div>
-</InfoBox>
+</Callout>
 
 The Entropy contract is deployed on the following testnet chains:
 

+ 1 - 1
apps/developer-hub/content/docs/entropy/fees.mdx

@@ -17,4 +17,4 @@ Note that protocols integrating with Entropy can pass these fees along to their
 submits a transaction that requests a random number, the user can directly pay the entropy fees required
 with the native blockchain token. There are no fees for revealing the random numbers.
 
-You can check the current fees in the [chainlist and fee details](./entropy/chainlist) page for each blockchain.
+You can check the current fees in the [chainlist and fee details](./chainlist) page for each blockchain.

+ 0 - 1
apps/developer-hub/content/docs/entropy/whats-new-entropyv2.mdx

@@ -22,7 +22,6 @@ Each of these request types is described in more detail with examples in [Reques
 ### 2. Enhanced Callback Status
 
 Entropy V2 introduces callback statuses, which allow users to track the status of their callbacks.
-
 [Pyth Dev-Forum Announcement](https://dev-forum.pyth.network/t/announcing-entropy-v2/324#p-649-enhanced-callback-statuses-2) provides more details on enhanced callback statuses.
 
 ### 3. Entropy Explorer

+ 1 - 1
apps/developer-hub/content/docs/metrics/kpi.mdx

@@ -3,7 +3,7 @@ title: Pyth Network KPI
 description: Monthly informative data points on the Pyth network, its growth, and performance metrics.
 ---
 
-<Callout type="info" title="Pyth Network KPI "> 
+<Callout type="info" title="Pyth Network KPI ">
   For the latest KPI dashboard, please visit
   [https://kpi.pyth.network/](https://kpi.pyth.network/).
 </Callout>

+ 36 - 2
apps/developer-hub/src/app/(docs)/[section]/layout.tsx

@@ -1,9 +1,43 @@
+import { Banner } from "fumadocs-ui/components/banner";
 import { DocsLayout } from "fumadocs-ui/layouts/docs";
+import Link from "next/link";
 import type { ReactNode } from "react";
 
 import { docsOptions } from "../../../config/layout.config";
 
-export default function Layout({ children }: { children: ReactNode }) {
+export default function Layout({
+  children,
+  params,
+}: {
+  children: ReactNode;
+  params: { section: string };
+}) {
+  const { section } = params;
   const options = { ...docsOptions };
-  return <DocsLayout {...options}>{children}</DocsLayout>;
+
+  return (
+    <>
+      {section === "entropy" && (
+        <Banner changeLayout={false} id="entropy-v2" variant="rainbow">
+          <span>
+            <strong>
+              Try the{" "}
+              <a
+                href="https://entropy-explorer.pyth.network/"
+                target="_blank"
+                rel="noopener noreferrer"
+              >
+                Entropy Explorer
+              </a>
+            </strong>{" "}
+            to track and debug callback issues. &nbsp;|&nbsp;
+            <Link href="./entropy/whats-new-entropyv2">
+              Learn what&apos;s new in Entropy v2.
+            </Link>
+          </span>
+        </Banner>
+      )}
+      <DocsLayout {...options}>{children}</DocsLayout>
+    </>
+  );
 }