Skip to content

Commit 09c01df

Browse files
committed
feat: remove app shell for now
1 parent ffc4a97 commit 09c01df

File tree

4 files changed

+48
-51
lines changed

4 files changed

+48
-51
lines changed

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,7 @@ import type { ReactNode } from "react";
33

44
import { docsOptions } from "../../../config/layout.config";
55

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 }) {
147
const options = { ...docsOptions };
15-
options.sidebar = {
16-
...options.sidebar,
17-
// {} (empty object) means true
18-
tabs: params.section === "price-feeds" ? {} : false,
19-
};
208
return <DocsLayout {...options}>{children}</DocsLayout>;
219
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@import "tailwindcss";
22
@import "fumadocs-ui/css/neutral.css";
33
@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"; */
Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
import { AppBody, AppShellRoot } from "@pythnetwork/component-library/AppShell";
1+
import { RootProviders } from "@pythnetwork/component-library/AppShell";
22
import { RootProvider as FumadocsRootProvider } from "fumadocs-ui/provider";
33
import { NuqsAdapter } from "nuqs/adapters/next/app";
44
import type { ReactNode } from "react";
55

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-
136
import "./global.css";
147

158
export const TABS = [
@@ -24,21 +17,19 @@ type Props = {
2417
};
2518

2619
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
4233
appName="Developer Hub"
4334
displaySupportButton={false}
4435
extraCta={<SearchButton />}
@@ -47,9 +38,11 @@ export const Root = ({ children }: Props) => (
4738
href: "https://dev-forum.pyth.network/",
4839
}}
4940
tabs={TABS}
50-
>
51-
{children}
52-
</AppBody>
53-
</FumadocsRootProvider>
54-
</AppShellRoot>
41+
> */}
42+
{children}
43+
{/* </AppBody> */}
44+
</FumadocsRootProvider>
45+
</RootProviders>
46+
</body>
47+
</html>
5548
);

apps/developer-hub/src/config/layout.config.tsx

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,36 @@ import { source } from "../lib/source";
66
export const baseOptions: BaseLayoutProps = {
77
nav: {
88
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+
),
923
},
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+
// },
1631
};
1732

1833
export const docsOptions: DocsLayoutProps = {
1934
...baseOptions,
2035
tree: source.pageTree,
2136
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,
2440
},
2541
};

0 commit comments

Comments
 (0)