Skip to content

Commit aa60196

Browse files
authored
docs: Adding relayer and monitor docs for stylus (#81)
* docs: Adding relayer and monitor docs for stylus * chore: Fix lint issue
1 parent 3ded901 commit aa60196

3 files changed

Lines changed: 371 additions & 0 deletions

File tree

src/components/layout/docs-layout-client.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ export function DocsLayoutClient({ children }: DocsLayoutClientProps) {
5151
? new Set(["/substrate-runtimes", "/monitor", "/relayer"])
5252
: new Set(["/substrate-runtimes"]);
5353

54+
const arbitrumStylusUrls =
55+
isSharedPath && lastEcosystem === "contracts-stylus"
56+
? new Set(["/contracts-stylus", "/monitor", "/relayer"])
57+
: new Set(["/contracts-stylus"]);
58+
5459
return [
5560
{
5661
title: "Ethereum & EVM",
@@ -73,6 +78,7 @@ export function DocsLayoutClient({ children }: DocsLayoutClientProps) {
7378
title: "Arbitrum Stylus",
7479
url: "/contracts-stylus",
7580
icon: <ArbitrumIcon className="w-5 h-5" />,
81+
urls: arbitrumStylusUrls,
7682
},
7783
{
7884
title: "Starknet",

src/hooks/use-navigation-tree.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export function useNavigationTree() {
2525
sessionStorage.setItem("lastEcosystem", "stellar");
2626
} else if (pathname.startsWith("/substrate-runtimes")) {
2727
sessionStorage.setItem("lastEcosystem", "polkadot");
28+
} else if (pathname.startsWith("/contracts-stylus")) {
29+
sessionStorage.setItem("lastEcosystem", "contracts-stylus");
2830
} else if (
2931
pathname.startsWith("/contracts") ||
3032
pathname.startsWith("/community-contracts") ||
@@ -73,6 +75,8 @@ export function useNavigationTree() {
7375
return polkadotTree;
7476
case "ethereum":
7577
return ethereumEvmTree;
78+
case "contracts-stylus":
79+
return arbitrumStylusTree;
7680
default:
7781
return ethereumEvmTree;
7882
}

0 commit comments

Comments
 (0)