Skip to content

Commit 2b1c660

Browse files
authored
Merge pull request #3047 from pyth-network/feat/dev-hub
feat(dev-hub): hide support and sidebar button
2 parents fa234c7 + ebc6f83 commit 2b1c660

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

apps/developer-hub/src/components/Root/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const Root = ({ children }: Props) => (
3434
>
3535
<AppShell
3636
appName="Developer Hub"
37+
displaySupportButton={false}
3738
amplitudeApiKey={AMPLITUDE_API_KEY}
3839
googleAnalyticsId={GOOGLE_ANALYTICS_ID}
3940
enableAccessibilityReporting={ENABLE_ACCESSIBILITY_REPORTING}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ export const docsOptions: DocsLayoutProps = {
2020
tree: source.pageTree,
2121
sidebar: {
2222
tabs: false,
23+
collapsible: false,
2324
},
2425
};

packages/component-library/src/AppShell/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const AppShell = ({
6262

6363
type AppBodyProps = Pick<
6464
ComponentProps<typeof Header>,
65-
"appName" | "mainCta" | "extraCta"
65+
"appName" | "mainCta" | "extraCta" | "displaySupportButton"
6666
> & {
6767
tabs?: Tab[] | undefined;
6868
children: ReactNode;

packages/component-library/src/Header/index.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type Props = ComponentProps<"header"> & {
3030
| undefined;
3131
mainMenu?: ReactNode | undefined;
3232
extraCta?: ReactNode | undefined;
33+
displaySupportButton?: boolean | undefined;
3334
};
3435

3536
export const Header = ({
@@ -38,6 +39,7 @@ export const Header = ({
3839
mainCta,
3940
mainMenu,
4041
extraCta,
42+
displaySupportButton = true,
4143
...props
4244
}: Props) => (
4345
<header className={clsx(styles.header, className)} {...props}>
@@ -53,16 +55,18 @@ export const Header = ({
5355
{mainMenu}
5456
</div>
5557
<div className={styles.rightMenu}>
56-
<Button
57-
variant="ghost"
58-
size="sm"
59-
rounded
60-
beforeIcon={<Lifebuoy />}
61-
drawer={SupportDrawer}
62-
className={styles.supportButton ?? ""}
63-
>
64-
Support
65-
</Button>
58+
{displaySupportButton && (
59+
<Button
60+
variant="ghost"
61+
size="sm"
62+
rounded
63+
beforeIcon={<Lifebuoy />}
64+
drawer={SupportDrawer}
65+
className={styles.supportButton ?? ""}
66+
>
67+
Support
68+
</Button>
69+
)}
6670
{extraCta}
6771
<MobileMenu className={styles.mobileMenu} mainCta={mainCta} />
6872
<Button

0 commit comments

Comments
 (0)