Skip to content

Commit 8f133fb

Browse files
committed
fix mobile
1 parent 1323bff commit 8f133fb

File tree

3 files changed

+155
-167
lines changed

3 files changed

+155
-167
lines changed

src/config/sidebar/__tests__/__snapshots__/ccip-dynamic.test.ts.snap

Lines changed: 82 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -86,122 +86,116 @@ exports[`CCIP Sidebar Configuration Snapshot should match the expected sidebar s
8686
{
8787
"contents": [
8888
{
89+
"title": "Overview",
90+
"url": "ccip/concepts/architecture/overview",
91+
},
92+
{
93+
"title": "Key Concepts",
94+
"url": "ccip/concepts/architecture/key-concepts",
95+
},
96+
{
97+
"chainTypes": [
98+
"evm",
99+
],
89100
"children": [
90101
{
102+
"chainTypes": [
103+
"evm",
104+
],
91105
"title": "Overview",
92-
"url": "ccip/concepts/architecture/overview",
106+
"url": "ccip/concepts/architecture/onchain/evm/overview",
93107
},
94108
{
95-
"title": "Key Concepts",
96-
"url": "ccip/concepts/architecture/key-concepts",
109+
"chainTypes": [
110+
"evm",
111+
],
112+
"title": "Components",
113+
"url": "ccip/concepts/architecture/onchain/evm/components",
97114
},
98115
{
99116
"chainTypes": [
100117
"evm",
101118
],
102-
"children": [
103-
{
104-
"chainTypes": [
105-
"evm",
106-
],
107-
"title": "Overview",
108-
"url": "ccip/concepts/architecture/onchain/evm/overview",
109-
},
110-
{
111-
"chainTypes": [
112-
"evm",
113-
],
114-
"title": "Components",
115-
"url": "ccip/concepts/architecture/onchain/evm/components",
116-
},
117-
{
118-
"chainTypes": [
119-
"evm",
120-
],
121-
"title": "Upgradability",
122-
"url": "ccip/concepts/architecture/onchain/evm/upgradability",
123-
},
119+
"title": "Upgradability",
120+
"url": "ccip/concepts/architecture/onchain/evm/upgradability",
121+
},
122+
],
123+
"title": "Onchain Architecture",
124+
"url": "ccip/concepts/architecture/onchain/evm",
125+
},
126+
{
127+
"chainTypes": [
128+
"solana",
129+
],
130+
"children": [
131+
{
132+
"chainTypes": [
133+
"solana",
124134
],
125-
"title": "Onchain Architecture",
126-
"url": "ccip/concepts/architecture/onchain/evm",
135+
"title": "Overview",
136+
"url": "ccip/concepts/architecture/onchain/svm/overview",
127137
},
128138
{
129139
"chainTypes": [
130140
"solana",
131141
],
132-
"children": [
133-
{
134-
"chainTypes": [
135-
"solana",
136-
],
137-
"title": "Overview",
138-
"url": "ccip/concepts/architecture/onchain/svm/overview",
139-
},
140-
{
141-
"chainTypes": [
142-
"solana",
143-
],
144-
"title": "Components",
145-
"url": "ccip/concepts/architecture/onchain/svm/components",
146-
},
147-
{
148-
"chainTypes": [
149-
"solana",
150-
],
151-
"title": "Upgradability",
152-
"url": "ccip/concepts/architecture/onchain/svm/upgradability",
153-
},
142+
"title": "Components",
143+
"url": "ccip/concepts/architecture/onchain/svm/components",
144+
},
145+
{
146+
"chainTypes": [
147+
"solana",
154148
],
155-
"title": "Onchain Architecture",
156-
"url": "ccip/concepts/architecture/onchain/svm",
149+
"title": "Upgradability",
150+
"url": "ccip/concepts/architecture/onchain/svm/upgradability",
157151
},
152+
],
153+
"title": "Onchain Architecture",
154+
"url": "ccip/concepts/architecture/onchain/svm",
155+
},
156+
{
157+
"chainTypes": [
158+
"aptos",
159+
],
160+
"children": [
158161
{
159162
"chainTypes": [
160163
"aptos",
161164
],
162-
"children": [
163-
{
164-
"chainTypes": [
165-
"aptos",
166-
],
167-
"title": "Overview",
168-
"url": "ccip/concepts/architecture/onchain/aptos/overview",
169-
},
170-
{
171-
"chainTypes": [
172-
"aptos",
173-
],
174-
"title": "Components",
175-
"url": "ccip/concepts/architecture/onchain/aptos/components",
176-
},
177-
{
178-
"chainTypes": [
179-
"aptos",
180-
],
181-
"title": "Upgradability",
182-
"url": "ccip/concepts/architecture/onchain/aptos/upgradability",
183-
},
165+
"title": "Overview",
166+
"url": "ccip/concepts/architecture/onchain/aptos/overview",
167+
},
168+
{
169+
"chainTypes": [
170+
"aptos",
184171
],
185-
"title": "Onchain Architecture",
186-
"url": "ccip/concepts/architecture/onchain/aptos",
172+
"title": "Components",
173+
"url": "ccip/concepts/architecture/onchain/aptos/components",
187174
},
188175
{
189-
"children": [
190-
{
191-
"title": "Overview",
192-
"url": "ccip/concepts/architecture/offchain/overview",
193-
},
194-
{
195-
"title": "Risk Management Network",
196-
"url": "ccip/concepts/architecture/offchain/risk-management-network",
197-
},
176+
"chainTypes": [
177+
"aptos",
198178
],
199-
"title": "Offchain Architecture",
200-
"url": "ccip/concepts/architecture/offchain",
179+
"title": "Upgradability",
180+
"url": "ccip/concepts/architecture/onchain/aptos/upgradability",
181+
},
182+
],
183+
"title": "Onchain Architecture",
184+
"url": "ccip/concepts/architecture/onchain/aptos",
185+
},
186+
{
187+
"children": [
188+
{
189+
"title": "Overview",
190+
"url": "ccip/concepts/architecture/offchain/overview",
191+
},
192+
{
193+
"title": "Risk Management Network",
194+
"url": "ccip/concepts/architecture/offchain/risk-management-network",
201195
},
202196
],
203-
"title": "Architecture",
204-
"url": "ccip/concepts/architecture",
197+
"title": "Offchain Architecture",
198+
"url": "ccip/concepts/architecture/offchain",
205199
},
206200
{
207201
"children": [

src/config/sidebar/ccip-dynamic.ts

Lines changed: 71 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -101,99 +101,93 @@ export const CCIP_SIDEBAR_CONTENT: SectionEntry[] = [
101101
section: "Concepts",
102102
contents: [
103103
{
104-
title: "Architecture",
105-
url: "ccip/concepts/architecture",
104+
title: "Overview",
105+
url: "ccip/concepts/architecture/overview",
106+
// Universal
107+
},
108+
{
109+
title: "Key Concepts",
110+
url: "ccip/concepts/architecture/key-concepts",
111+
// Universal
112+
},
113+
{
114+
title: "Onchain Architecture",
115+
url: "ccip/concepts/architecture/onchain/evm",
116+
chainTypes: ["evm"],
106117
children: [
107118
{
108119
title: "Overview",
109-
url: "ccip/concepts/architecture/overview",
110-
// Universal
120+
url: "ccip/concepts/architecture/onchain/evm/overview",
121+
chainTypes: ["evm"],
111122
},
112123
{
113-
title: "Key Concepts",
114-
url: "ccip/concepts/architecture/key-concepts",
115-
// Universal
124+
title: "Components",
125+
url: "ccip/concepts/architecture/onchain/evm/components",
126+
chainTypes: ["evm"],
116127
},
117128
{
118-
title: "Onchain Architecture",
119-
url: "ccip/concepts/architecture/onchain/evm",
129+
title: "Upgradability",
130+
url: "ccip/concepts/architecture/onchain/evm/upgradability",
120131
chainTypes: ["evm"],
121-
children: [
122-
{
123-
title: "Overview",
124-
url: "ccip/concepts/architecture/onchain/evm/overview",
125-
chainTypes: ["evm"],
126-
},
127-
{
128-
title: "Components",
129-
url: "ccip/concepts/architecture/onchain/evm/components",
130-
chainTypes: ["evm"],
131-
},
132-
{
133-
title: "Upgradability",
134-
url: "ccip/concepts/architecture/onchain/evm/upgradability",
135-
chainTypes: ["evm"],
136-
},
137-
],
138132
},
133+
],
134+
},
135+
{
136+
title: "Onchain Architecture",
137+
url: "ccip/concepts/architecture/onchain/svm",
138+
chainTypes: ["solana"],
139+
children: [
139140
{
140-
title: "Onchain Architecture",
141-
url: "ccip/concepts/architecture/onchain/svm",
141+
title: "Overview",
142+
url: "ccip/concepts/architecture/onchain/svm/overview",
143+
chainTypes: ["solana"],
144+
},
145+
{
146+
title: "Components",
147+
url: "ccip/concepts/architecture/onchain/svm/components",
142148
chainTypes: ["solana"],
143-
children: [
144-
{
145-
title: "Overview",
146-
url: "ccip/concepts/architecture/onchain/svm/overview",
147-
chainTypes: ["solana"],
148-
},
149-
{
150-
title: "Components",
151-
url: "ccip/concepts/architecture/onchain/svm/components",
152-
chainTypes: ["solana"],
153-
},
154-
{
155-
title: "Upgradability",
156-
url: "ccip/concepts/architecture/onchain/svm/upgradability",
157-
chainTypes: ["solana"],
158-
},
159-
],
160149
},
161150
{
162-
title: "Onchain Architecture",
163-
url: "ccip/concepts/architecture/onchain/aptos",
151+
title: "Upgradability",
152+
url: "ccip/concepts/architecture/onchain/svm/upgradability",
153+
chainTypes: ["solana"],
154+
},
155+
],
156+
},
157+
{
158+
title: "Onchain Architecture",
159+
url: "ccip/concepts/architecture/onchain/aptos",
160+
chainTypes: ["aptos"],
161+
children: [
162+
{
163+
title: "Overview",
164+
url: "ccip/concepts/architecture/onchain/aptos/overview",
164165
chainTypes: ["aptos"],
165-
children: [
166-
{
167-
title: "Overview",
168-
url: "ccip/concepts/architecture/onchain/aptos/overview",
169-
chainTypes: ["aptos"],
170-
},
171-
{
172-
title: "Components",
173-
url: "ccip/concepts/architecture/onchain/aptos/components",
174-
chainTypes: ["aptos"],
175-
},
176-
{
177-
title: "Upgradability",
178-
url: "ccip/concepts/architecture/onchain/aptos/upgradability",
179-
chainTypes: ["aptos"],
180-
},
181-
],
182166
},
183167
{
184-
title: "Offchain Architecture",
185-
url: "ccip/concepts/architecture/offchain",
186-
// Universal
187-
children: [
188-
{
189-
title: "Overview",
190-
url: "ccip/concepts/architecture/offchain/overview",
191-
},
192-
{
193-
title: "Risk Management Network",
194-
url: "ccip/concepts/architecture/offchain/risk-management-network",
195-
},
196-
],
168+
title: "Components",
169+
url: "ccip/concepts/architecture/onchain/aptos/components",
170+
chainTypes: ["aptos"],
171+
},
172+
{
173+
title: "Upgradability",
174+
url: "ccip/concepts/architecture/onchain/aptos/upgradability",
175+
chainTypes: ["aptos"],
176+
},
177+
],
178+
},
179+
{
180+
title: "Offchain Architecture",
181+
url: "ccip/concepts/architecture/offchain",
182+
// Universal
183+
children: [
184+
{
185+
title: "Overview",
186+
url: "ccip/concepts/architecture/offchain/overview",
187+
},
188+
{
189+
title: "Risk Management Network",
190+
url: "ccip/concepts/architecture/offchain/risk-management-network",
197191
},
198192
],
199193
},

src/utils/chainType.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect, test, describe } from "@jest/globals"
2-
import { propagateChainTypes } from "./chainType.js"
3-
import type { SectionContent } from "~/config/sidebar.js"
2+
import { propagateChainTypes } from "./chainType.ts"
3+
import type { SectionContent } from "~/config/sidebar.ts"
44

55
describe("propagateChainTypes", () => {
66
test("children without chainTypes inherit from parent", () => {

0 commit comments

Comments
 (0)