Skip to content

Commit eb9a564

Browse files
committed
chore: added ui builder to stellar navigation tree
1 parent 1c06d05 commit eb9a564

3 files changed

Lines changed: 57 additions & 4 deletions

File tree

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ export function DocsLayoutClient({ children }: DocsLayoutClientProps) {
3333
}
3434

3535
const isSharedPath =
36-
pathname.startsWith("/monitor") || pathname.startsWith("/relayer");
36+
pathname.startsWith("/monitor") ||
37+
pathname.startsWith("/relayer") ||
38+
pathname.startsWith("/ui-builder");
3739
const lastEcosystem =
3840
typeof window !== "undefined"
3941
? sessionStorage.getItem("lastEcosystem")
@@ -42,7 +44,7 @@ export function DocsLayoutClient({ children }: DocsLayoutClientProps) {
4244
// Include shared paths in Stellar tab only if coming from Stellar context
4345
const stellarUrls =
4446
isSharedPath && lastEcosystem === "stellar"
45-
? new Set(["/stellar-contracts", "/monitor", "/relayer"])
47+
? new Set(["/stellar-contracts", "/monitor", "/relayer", "/ui-builder"])
4648
: new Set(["/stellar-contracts"]);
4749

4850
// Include shared paths in Polkadot tab only if coming from Polkadot context

src/hooks/use-navigation-tree.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ export function useNavigationTree() {
3030
pathname.startsWith("/community-contracts") ||
3131
pathname.startsWith("/upgrades-plugins") ||
3232
pathname.startsWith("/wizard") ||
33-
pathname.startsWith("/ui-builder") ||
3433
pathname.startsWith("/upgrades") ||
3534
pathname.startsWith("/defender") ||
3635
pathname.startsWith("/tools")
3736
) {
3837
sessionStorage.setItem("lastEcosystem", "ethereum");
3938
}
39+
// Note: /ui-builder, /monitor, and /relayer paths are intentionally NOT set here
40+
// They inherit the lastEcosystem from whichever tab the user was in before navigating
4041
}, [pathname]);
4142

4243
// Determine which navigation tree to use based on the current path
@@ -65,7 +66,11 @@ export function useNavigationTree() {
6566
if (typeof window !== "undefined") {
6667
const lastEcosystem = sessionStorage.getItem("lastEcosystem");
6768

68-
if (pathname.startsWith("/monitor") || pathname.startsWith("/relayer")) {
69+
if (
70+
pathname.startsWith("/monitor") ||
71+
pathname.startsWith("/relayer") ||
72+
pathname.startsWith("/ui-builder")
73+
) {
6974
switch (lastEcosystem) {
7075
case "stellar":
7176
return stellarTree;

src/navigation/stellar.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,5 +500,51 @@
500500
"external": true
501501
}
502502
]
503+
},
504+
{
505+
"type": "folder",
506+
"name": "UI Builder",
507+
"children": [
508+
{
509+
"type": "page",
510+
"name": "Quickstart",
511+
"url": "/ui-builder"
512+
},
513+
{
514+
"type": "page",
515+
"name": "Networks",
516+
"url": "/ui-builder/networks"
517+
},
518+
{
519+
"type": "page",
520+
"name": "Loading Contracts",
521+
"url": "/ui-builder/loading-contracts"
522+
},
523+
{
524+
"type": "page",
525+
"name": "Functions",
526+
"url": "/ui-builder/functions"
527+
},
528+
{
529+
"type": "page",
530+
"name": "Customization",
531+
"url": "/ui-builder/customization"
532+
},
533+
{
534+
"type": "page",
535+
"name": "Exporting and History",
536+
"url": "/ui-builder/exporting-and-history"
537+
},
538+
{
539+
"type": "page",
540+
"name": "Building Adapters",
541+
"url": "/ui-builder/building-adapters"
542+
},
543+
{
544+
"type": "page",
545+
"name": "Changelog",
546+
"url": "/ui-builder/changelog"
547+
}
548+
]
503549
}
504550
]

0 commit comments

Comments
 (0)