index.tsx 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import { RootProviders } from "@pythnetwork/component-library/AppShell";
  2. import { RootProvider as FumadocsRootProvider } from "fumadocs-ui/provider";
  3. import { NuqsAdapter } from "nuqs/adapters/next/app";
  4. import type { ReactNode } from "react";
  5. import "./global.css";
  6. export const TABS = [
  7. { segment: "", children: "Home" },
  8. { segment: "price-feeds", children: "Price Feeds" },
  9. { segment: "express-relay", children: "Express Relay" },
  10. { segment: "entropy", children: "Entropy" },
  11. ];
  12. type Props = {
  13. children: ReactNode;
  14. };
  15. export const Root = ({ children }: Props) => (
  16. <html lang="en">
  17. <body>
  18. <RootProviders providers={[NuqsAdapter]}>
  19. <FumadocsRootProvider
  20. search={{
  21. enabled: true,
  22. options: {
  23. api: "/api/search",
  24. },
  25. }}
  26. >
  27. {/* commenting out the app body because we don't have the app shell anymore
  28. <AppBody
  29. appName="Developer Hub"
  30. displaySupportButton={false}
  31. extraCta={<SearchButton />}
  32. mainCta={{
  33. label: "Developer Forum",
  34. href: "https://dev-forum.pyth.network/",
  35. }}
  36. tabs={TABS}
  37. > */}
  38. {children}
  39. {/* </AppBody> */}
  40. </FumadocsRootProvider>
  41. </RootProviders>
  42. </body>
  43. </html>
  44. );