Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/components/layout/docs-layout-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -83,6 +89,7 @@ export function DocsLayoutClient({ children }: DocsLayoutClientProps) {
title: "Polkadot",
url: "/substrate-runtimes",
icon: <PolkadotIcon className="w-5 h-5" />,
urls: polkadotUrls,
},
{
title: "Uniswap Hooks",
Expand Down
4 changes: 4 additions & 0 deletions src/hooks/use-navigation-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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") ||
Expand Down Expand Up @@ -64,6 +66,8 @@ export function useNavigationTree() {
switch (lastEcosystem) {
case "stellar":
return stellarTree;
case "polkadot":
return polkadotTree;
case "ethereum":
return ethereumEvmTree;
default:
Expand Down
66 changes: 66 additions & 0 deletions src/navigation/polkadot.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
]