Skip to content

Commit fa0ef9a

Browse files
alexcamboseaditya520
authored andcommitted
fixes
1 parent 984ddbc commit fa0ef9a

File tree

8 files changed

+28
-22
lines changed

8 files changed

+28
-22
lines changed
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
11
{
2-
"pages": [
3-
"pyth-core",
4-
"pyth-token",
5-
"oracle-integrity-staking",
6-
"express-relay",
7-
"entropy",
8-
"metrics",
9-
"whitepaper",
10-
"security"
11-
]
2+
"pages": ["price-feeds"]
123
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { DocsLayout } from "fumadocs-ui/layouts/docs";
2+
import type { ReactNode } from "react";
3+
4+
import { docsOptions } from "../../../config/layout.config";
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;
14+
const options = { ...docsOptions };
15+
options.sidebar = {
16+
...options.sidebar,
17+
// {} (empty object) means true
18+
tabs: params.section === "price-feeds" ? {} : false,
19+
};
20+
return <DocsLayout {...options}>{children}</DocsLayout>;
21+
}

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

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { Homepage as default } from "../../components/Pages/Homepage";

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ export const baseOptions: BaseLayoutProps = {
1717

1818
export const docsOptions: DocsLayoutProps = {
1919
...baseOptions,
20-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
21-
tree: source.pageTree as any,
20+
tree: source.pageTree,
2221
sidebar: {
2322
tabs: false,
2423
collapsible: false,

apps/developer-hub/src/lib/source.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export const source = loader({
5656
},
5757
source: docs.toFumadocsSource(),
5858
pageTree: {
59+
// types are very similar but not exactly the same
5960
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
6061
transformers: [transformerOpenAPI()],
6162
},

packages/component-library/src/InfoBox/index.module.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
@each $variant in ("neutral", "info", "warning", "error", "data", "success") {
3737
&[data-variant="#{$variant}"] {
3838
background-color: theme.color("states", $variant, "background");
39-
39+
border: theme.spacing(1) solid theme.color("states", $variant, "normal");
40+
4041
.icon {
4142
color: theme.color("states", $variant, "normal");
4243
}

packages/component-library/src/InfoBox/index.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const meta = {
3535
},
3636
variant: {
3737
control: "select",
38-
options: ["Neutral", "Info", "Warning", "Error", "Data", "Success"],
38+
options: ["neutral", "info", "warning", "error", "data", "success"],
3939
description: "The variant of the info box.",
4040
table: {
4141
category: "Appearance",

0 commit comments

Comments
 (0)