diff --git a/src/components/layout/docs-layout-client.tsx b/src/components/layout/docs-layout-client.tsx index 409b22eb..b817c362 100644 --- a/src/components/layout/docs-layout-client.tsx +++ b/src/components/layout/docs-layout-client.tsx @@ -40,6 +40,12 @@ export function DocsLayoutClient({ children }: DocsLayoutClientProps) { ? new Set(["/stellar-contracts", "/monitor", "/relayer"]) : new Set(["/stellar-contracts"]); + // Include shared paths in Polkadot tab only if coming from Polkadot context + const polkadotUrls = + isSharedPath && lastEcosystem === "polkadot" + ? new Set(["/substrate-runtimes", "/monitor"]) + : new Set(["/substrate-runtimes"]); + return [ { title: "Ethereum & EVM", @@ -83,6 +89,7 @@ export function DocsLayoutClient({ children }: DocsLayoutClientProps) { title: "Polkadot", url: "/substrate-runtimes", icon: , + urls: polkadotUrls, }, { title: "Uniswap Hooks", diff --git a/src/hooks/use-navigation-tree.ts b/src/hooks/use-navigation-tree.ts index 2f0a0e3f..0cdb10f8 100644 --- a/src/hooks/use-navigation-tree.ts +++ b/src/hooks/use-navigation-tree.ts @@ -22,6 +22,8 @@ export function useNavigationTree() { if (pathname.startsWith("/stellar-contracts")) { sessionStorage.setItem("lastEcosystem", "stellar"); + } else if (pathname.startsWith("/substrate-runtimes")) { + sessionStorage.setItem("lastEcosystem", "polkadot"); } else if ( pathname.startsWith("/contracts") || pathname.startsWith("/community-contracts") || @@ -64,6 +66,8 @@ export function useNavigationTree() { switch (lastEcosystem) { case "stellar": return stellarTree; + case "polkadot": + return polkadotTree; case "ethereum": return ethereumEvmTree; default: diff --git a/src/navigation/polkadot.json b/src/navigation/polkadot.json index f08dc386..70c1c520 100644 --- a/src/navigation/polkadot.json +++ b/src/navigation/polkadot.json @@ -353,5 +353,71 @@ ] } ] + }, + { + "type": "separator", + "name": "Open Source Tools" + }, + { + "type": "folder", + "name": "Monitor", + "index": { + "type": "page", + "name": "Overview", + "url": "/monitor/1.1.x" + }, + "children": [ + { + "type": "page", + "name": "Quickstart", + "url": "/monitor/1.1.x/quickstart" + }, + { + "type": "page", + "name": "Architecture Guide", + "url": "/monitor/1.1.x/architecture" + }, + { + "type": "page", + "name": "Project Structure", + "url": "/monitor/1.1.x/project-structure" + }, + { + "type": "page", + "name": "RPC Client", + "url": "/monitor/1.1.x/rpc" + }, + { + "type": "page", + "name": "Custom scripts", + "url": "/monitor/1.1.x/scripts" + }, + { + "type": "page", + "name": "Error Handling", + "url": "/monitor/1.1.x/error" + }, + { + "type": "page", + "name": "Testing", + "url": "/monitor/1.1.x/testing" + }, + { + "type": "page", + "name": "Contribution guidelines", + "url": "/monitor/1.1.x/contribution" + }, + { + "type": "page", + "name": "Changelog", + "url": "/monitor/1.1.x/changelog" + }, + { + "type": "page", + "name": "Rust Book", + "url": "https://docs-v1-1--openzeppelin-monitor.netlify.app/openzeppelin_monitor/", + "external": true + } + ] } ]