diff --git a/apps/developer-hub/content/docs/meta.json b/apps/developer-hub/content/docs/meta.json index f58ac9f7ba..0d89d9cdc8 100644 --- a/apps/developer-hub/content/docs/meta.json +++ b/apps/developer-hub/content/docs/meta.json @@ -1,3 +1,3 @@ { - "pages": ["price-feeds"] + "pages": ["price-feeds", "express-relay", "entropy"] } diff --git a/apps/developer-hub/src/app/(docs)/[section]/layout.tsx b/apps/developer-hub/src/app/(docs)/[section]/layout.tsx index 3fb955a7e0..8a258e1fe6 100644 --- a/apps/developer-hub/src/app/(docs)/[section]/layout.tsx +++ b/apps/developer-hub/src/app/(docs)/[section]/layout.tsx @@ -3,19 +3,7 @@ import type { ReactNode } from "react"; import { docsOptions } from "../../../config/layout.config"; -export default async function Layout({ - children, - ...props -}: { - children: ReactNode; - params: Promise<{ section: string }>; -}) { - const params = await props.params; +export default function Layout({ children }: { children: ReactNode }) { const options = { ...docsOptions }; - options.sidebar = { - ...options.sidebar, - // {} (empty object) means true - tabs: params.section === "price-feeds" ? {} : false, - }; return {children}; } diff --git a/apps/developer-hub/src/app/price-feeds/page.tsx b/apps/developer-hub/src/app/price-feeds/page.tsx deleted file mode 100644 index d3e3d42298..0000000000 --- a/apps/developer-hub/src/app/price-feeds/page.tsx +++ /dev/null @@ -1 +0,0 @@ -export { Homepage as default } from "../../components/Pages/Homepage"; diff --git a/apps/developer-hub/src/components/Root/global.css b/apps/developer-hub/src/components/Root/global.css index 8db5c5c3fa..150e7f18aa 100644 --- a/apps/developer-hub/src/components/Root/global.css +++ b/apps/developer-hub/src/components/Root/global.css @@ -1,5 +1,5 @@ @import "tailwindcss"; @import "fumadocs-ui/css/neutral.css"; @import "fumadocs-ui/css/preset.css"; -@import "./theme.css"; -@import "./fumadocs-global-style-overrides.css"; +@import "./theme.css"; /*this overrides the default colors to match the pyth branding */ +/* @import "./fumadocs-global-style-overrides.css"; */ diff --git a/apps/developer-hub/src/components/Root/index.tsx b/apps/developer-hub/src/components/Root/index.tsx index aae615145a..64ce8d687d 100644 --- a/apps/developer-hub/src/components/Root/index.tsx +++ b/apps/developer-hub/src/components/Root/index.tsx @@ -1,15 +1,8 @@ -import { AppBody, AppShellRoot } from "@pythnetwork/component-library/AppShell"; +import { RootProviders } from "@pythnetwork/component-library/AppShell"; import { RootProvider as FumadocsRootProvider } from "fumadocs-ui/provider"; import { NuqsAdapter } from "nuqs/adapters/next/app"; import type { ReactNode } from "react"; -import { - AMPLITUDE_API_KEY, - ENABLE_ACCESSIBILITY_REPORTING, - GOOGLE_ANALYTICS_ID, -} from "../../config/server"; -import { SearchButton } from "../search-button"; - import "./global.css"; export const TABS = [ @@ -24,21 +17,19 @@ type Props = { }; export const Root = ({ children }: Props) => ( - - - + + + + {/* commenting out the app body because we don't have the app shell anymore + } @@ -47,9 +38,11 @@ export const Root = ({ children }: Props) => ( href: "https://dev-forum.pyth.network/", }} tabs={TABS} - > - {children} - - - + > */} + {children} + {/* */} + + + + ); diff --git a/apps/developer-hub/src/config/layout.config.tsx b/apps/developer-hub/src/config/layout.config.tsx index a6c5e708e8..6e18cecdc8 100644 --- a/apps/developer-hub/src/config/layout.config.tsx +++ b/apps/developer-hub/src/config/layout.config.tsx @@ -1,3 +1,4 @@ +import { Logo } from "@pythnetwork/component-library/Header"; import type { DocsLayoutProps } from "fumadocs-ui/layouts/docs"; import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared"; @@ -6,20 +7,28 @@ import { source } from "../lib/source"; export const baseOptions: BaseLayoutProps = { nav: { enabled: true, + title: ( + <> + + Developer Hub + + ), }, - themeSwitch: { - enabled: false, // Keep this false as the theme switch is handled by the component library - }, - searchToggle: { - enabled: false, - }, + // these are commented out because we don't have the app shell anymore + // themeSwitch: { + // enabled: false, // Keep this false as the theme switch is handled by the component library + // }, + // searchToggle: { + // enabled: false, + // }, }; export const docsOptions: DocsLayoutProps = { ...baseOptions, tree: source.pageTree, sidebar: { - tabs: false, - collapsible: false, + // these are commented out because we don't have the app shell anymore + // tabs: false, + // collapsible: false, }, }; diff --git a/packages/component-library/src/Header/index.tsx b/packages/component-library/src/Header/index.tsx index 7b3e1f2d5c..1052d120b7 100644 --- a/packages/component-library/src/Header/index.tsx +++ b/packages/component-library/src/Header/index.tsx @@ -20,6 +20,8 @@ import { Card } from "../Card/index.jsx"; import { Link } from "../Link/index.jsx"; import type { Link as UnstyledLink } from "../unstyled/Link/index.jsx"; +export { default as Logo } from "./logo.svg"; + type Props = ComponentProps<"header"> & { appName: string; mainCta?: @@ -239,3 +241,5 @@ export const SupportDrawer = { ), }; + +export { default as HeaderLogo } from "./logo.svg";