File tree Expand file tree Collapse file tree 4 files changed +48
-51
lines changed Expand file tree Collapse file tree 4 files changed +48
-51
lines changed Original file line number Diff line number Diff line change @@ -3,19 +3,7 @@ import type { ReactNode } from "react";
3
3
4
4
import { docsOptions } from "../../../config/layout.config" ;
5
5
6
- export default async function Layout ( {
7
- children,
8
- ...props
9
- } : {
10
- children : ReactNode ;
11
- params : Promise < { section : string } > ;
12
- } ) {
13
- const params = await props . params ;
6
+ export default function Layout ( { children } : { children : ReactNode } ) {
14
7
const options = { ...docsOptions } ;
15
- options . sidebar = {
16
- ...options . sidebar ,
17
- // {} (empty object) means true
18
- tabs : params . section === "price-feeds" ? { } : false ,
19
- } ;
20
8
return < DocsLayout { ...options } > { children } </ DocsLayout > ;
21
9
}
Original file line number Diff line number Diff line change 1
1
@import "tailwindcss" ;
2
2
@import "fumadocs-ui/css/neutral.css" ;
3
3
@import "fumadocs-ui/css/preset.css" ;
4
- @import "./theme.css" ;
5
- @import "./fumadocs-global-style-overrides.css" ;
4
+ @import "./theme.css" ; /*this overrides the default colors to match the pyth branding */
5
+ /* @import "./fumadocs-global-style-overrides.css"; */
Original file line number Diff line number Diff line change 1
- import { AppBody , AppShellRoot } from "@pythnetwork/component-library/AppShell" ;
1
+ import { RootProviders } from "@pythnetwork/component-library/AppShell" ;
2
2
import { RootProvider as FumadocsRootProvider } from "fumadocs-ui/provider" ;
3
3
import { NuqsAdapter } from "nuqs/adapters/next/app" ;
4
4
import type { ReactNode } from "react" ;
5
5
6
- import {
7
- AMPLITUDE_API_KEY ,
8
- ENABLE_ACCESSIBILITY_REPORTING ,
9
- GOOGLE_ANALYTICS_ID ,
10
- } from "../../config/server" ;
11
- import { SearchButton } from "../search-button" ;
12
-
13
6
import "./global.css" ;
14
7
15
8
export const TABS = [
@@ -24,21 +17,19 @@ type Props = {
24
17
} ;
25
18
26
19
export const Root = ( { children } : Props ) => (
27
- < AppShellRoot
28
- amplitudeApiKey = { AMPLITUDE_API_KEY }
29
- googleAnalyticsId = { GOOGLE_ANALYTICS_ID }
30
- enableAccessibilityReporting = { ENABLE_ACCESSIBILITY_REPORTING }
31
- providers = { [ NuqsAdapter ] }
32
- >
33
- < FumadocsRootProvider
34
- search = { {
35
- enabled : true ,
36
- options : {
37
- api : "/api/search" ,
38
- } ,
39
- } }
40
- >
41
- < AppBody
20
+ < html lang = "en" >
21
+ < body >
22
+ < RootProviders providers = { [ NuqsAdapter ] } >
23
+ < FumadocsRootProvider
24
+ search = { {
25
+ enabled : true ,
26
+ options : {
27
+ api : "/api/search" ,
28
+ } ,
29
+ } }
30
+ >
31
+ { /* commenting out the app body because we don't have the app shell anymore
32
+ <AppBody
42
33
appName="Developer Hub"
43
34
displaySupportButton={false}
44
35
extraCta={<SearchButton />}
@@ -47,9 +38,11 @@ export const Root = ({ children }: Props) => (
47
38
href: "https://dev-forum.pyth.network/",
48
39
}}
49
40
tabs={TABS}
50
- >
51
- { children }
52
- </ AppBody >
53
- </ FumadocsRootProvider >
54
- </ AppShellRoot >
41
+ > */ }
42
+ { children }
43
+ { /* </AppBody> */ }
44
+ </ FumadocsRootProvider >
45
+ </ RootProviders >
46
+ </ body >
47
+ </ html >
55
48
) ;
Original file line number Diff line number Diff line change @@ -6,20 +6,36 @@ import { source } from "../lib/source";
6
6
export const baseOptions : BaseLayoutProps = {
7
7
nav : {
8
8
enabled : true ,
9
+ title : (
10
+ // todo change the logo here
11
+ < >
12
+ < svg
13
+ width = "24"
14
+ height = "24"
15
+ xmlns = "http://www.w3.org/2000/svg"
16
+ aria-label = "Logo"
17
+ >
18
+ < circle cx = { 12 } cy = { 12 } r = { 12 } fill = "currentColor" />
19
+ </ svg >
20
+ Developer Hub
21
+ </ >
22
+ ) ,
9
23
} ,
10
- themeSwitch : {
11
- enabled : false , // Keep this false as the theme switch is handled by the component library
12
- } ,
13
- searchToggle : {
14
- enabled : false ,
15
- } ,
24
+ // these are commented out because we don't have the app shell anymore
25
+ // themeSwitch: {
26
+ // enabled: false, // Keep this false as the theme switch is handled by the component library
27
+ // },
28
+ // searchToggle: {
29
+ // enabled: false,
30
+ // },
16
31
} ;
17
32
18
33
export const docsOptions : DocsLayoutProps = {
19
34
...baseOptions ,
20
35
tree : source . pageTree ,
21
36
sidebar : {
22
- tabs : false ,
23
- collapsible : false ,
37
+ // these are commented out because we don't have the app shell anymore
38
+ // tabs: false,
39
+ // collapsible: false,
24
40
} ,
25
41
} ;
You can’t perform that action at this time.
0 commit comments