@@ -88,7 +88,7 @@ const RedirectToDashboard: FC = () => {
8888 navigate (
8989 RouteUtils . getDashboardRoute ( {
9090 network :
91- fixedNetwork ?? fixedLayer
91+ ( fixedNetwork ?? fixedLayer )
9292 ? RouteUtils . getEnabledNetworksForLayer ( fixedLayer ) [ 0 ] !
9393 : RouteUtils . getEnabledScopes ( ) [ 0 ] . network ,
9494 layer : fixedLayer ?? RouteUtils . getEnabledScopes ( ) [ 0 ] . layer ,
@@ -114,10 +114,7 @@ export const routes: RouteObject[] = [
114114 </ AnalyticsConsentProvider >
115115 ) ,
116116 children : [
117- {
118- path : '/' ,
119- element : skipGraph ? < RedirectToDashboard /> : withDefaultTheme ( < HomePage /> , true ) ,
120- } ,
117+ { path : '/' , element : skipGraph ? < RedirectToDashboard /> : withDefaultTheme ( < HomePage /> , true ) } ,
121118 ...( ! ! fixedNetwork && ! ! fixedLayer
122119 ? [ ]
123120 : [
@@ -135,14 +132,8 @@ export const routes: RouteObject[] = [
135132 } ,
136133 id : 'consensusScope' ,
137134 children : [
138- {
139- path : '' ,
140- element : < ConsensusDashboardPage /> ,
141- } ,
142- {
143- path : `address` ,
144- element : < ConsensusAccountsPage /> ,
145- } ,
135+ { path : '' , element : < ConsensusDashboardPage /> } ,
136+ { path : `address` , element : < ConsensusAccountsPage /> } ,
146137 {
147138 path : `address/:address` ,
148139 element : < ConsensusAccountDetailsPage /> ,
@@ -158,19 +149,9 @@ export const routes: RouteObject[] = [
158149 } ,
159150 ] ,
160151 } ,
161- {
162- path : `proposal` ,
163- element : < ProposalsPage /> ,
164- } ,
165- {
166- path : `proposal/:proposalId` ,
167- element : < ProposalDetailsPage /> ,
168- loader : proposalIdParamLoader ,
169- } ,
170- {
171- path : `validators` ,
172- element : < ValidatorsPage /> ,
173- } ,
152+ { path : `proposal` , element : < ProposalsPage /> } ,
153+ { path : `proposal/:proposalId` , element : < ProposalDetailsPage /> , loader : proposalIdParamLoader } ,
154+ { path : `validators` , element : < ValidatorsPage /> } ,
174155 {
175156 path : `validators/:address` ,
176157 element : < ValidatorDetailsPage /> ,
@@ -184,20 +165,14 @@ export const routes: RouteObject[] = [
184165 path : 'events' ,
185166 Component : ( ) => < ConsensusAccountEventsCard { ...useValidatorDetailsProps ( ) } /> ,
186167 } ,
187- {
188- path : 'delegators' ,
189- Component : ( ) => < DelegatorsCard { ...useValidatorDetailsProps ( ) } /> ,
190- } ,
168+ { path : 'delegators' , Component : ( ) => < DelegatorsCard { ...useValidatorDetailsProps ( ) } /> } ,
191169 {
192170 path : 'debonding-delegations' ,
193171 Component : ( ) => < DebondingDelegationsCard { ...useValidatorDetailsProps ( ) } /> ,
194172 } ,
195173 ] ,
196174 } ,
197- {
198- path : `block` ,
199- element : < ConsensusBlocksPage /> ,
200- } ,
175+ { path : `block` , element : < ConsensusBlocksPage /> } ,
201176 {
202177 path : `block/:blockHeight` ,
203178 element : < ConsensusBlockDetailPage /> ,
@@ -213,10 +188,7 @@ export const routes: RouteObject[] = [
213188 } ,
214189 ] ,
215190 } ,
216- {
217- path : 'tx' ,
218- element : < ConsensusTransactionsPage /> ,
219- } ,
191+ { path : 'tx' , element : < ConsensusTransactionsPage /> } ,
220192 {
221193 path : `tx/:hash` ,
222194 element : < ConsensusTransactionDetailPage /> ,
@@ -233,19 +205,13 @@ export const routes: RouteObject[] = [
233205 } ,
234206 id : 'runtimeScope' ,
235207 children : [
236- {
237- path : '' ,
238- element : < ParatimeDashboardPage /> ,
239- } ,
208+ { path : '' , element : < ParatimeDashboardPage /> } ,
240209 {
241210 path : 'search' , // Search within this scope
242211 element : < SearchResultsPage /> ,
243212 } ,
244213
245- {
246- path : `block` ,
247- element : < RuntimeBlocksPage /> ,
248- } ,
214+ { path : `block` , element : < RuntimeBlocksPage /> } ,
249215 {
250216 path : `block/:blockHeight` ,
251217 element : < RuntimeBlockDetailPage /> ,
@@ -266,14 +232,8 @@ export const routes: RouteObject[] = [
266232 element : < RuntimeAccountDetailsPage /> ,
267233 loader : runtimeAddressParamLoader ( ) ,
268234 children : [
269- {
270- path : '' ,
271- Component : ( ) => < AccountTransactionsCard { ...useRuntimeAccountDetailsProps ( ) } /> ,
272- } ,
273- {
274- path : 'events' ,
275- Component : ( ) => < AccountEventsCard { ...useRuntimeAccountDetailsProps ( ) } /> ,
276- } ,
235+ { path : '' , Component : ( ) => < AccountTransactionsCard { ...useRuntimeAccountDetailsProps ( ) } /> } ,
236+ { path : 'events' , Component : ( ) => < AccountEventsCard { ...useRuntimeAccountDetailsProps ( ) } /> } ,
277237 {
278238 path : 'token-transfers' ,
279239 Component : ( ) => < AccountTokenTransfersCard { ...useRuntimeAccountDetailsProps ( ) } /> ,
@@ -296,61 +256,34 @@ export const routes: RouteObject[] = [
296256 } ,
297257 ] ,
298258 } ,
299- {
300- path : 'code' ,
301- Component : ( ) => < ContractCodeCard { ...useRuntimeAccountDetailsProps ( ) } /> ,
302- } ,
259+ { path : 'code' , Component : ( ) => < ContractCodeCard { ...useRuntimeAccountDetailsProps ( ) } /> } ,
303260 ] ,
304261 } ,
305- {
306- path : `tx` ,
307- element : < RuntimeTransactionsPage /> ,
308- } ,
262+ { path : `tx` , element : < RuntimeTransactionsPage /> } ,
309263 {
310264 path : `tx/:hash` ,
311265 element : < RuntimeTransactionDetailPage /> ,
312266 loader : runtimeTransactionParamLoader ,
313267 } ,
314- {
315- path : `token` ,
316- element : < TokensPage /> ,
317- } ,
268+ { path : `token` , element : < TokensPage /> } ,
318269 {
319270 path : 'token/:address/instance/:instanceId' ,
320271 element : < NFTInstanceDashboardPage /> ,
321272 loader : runtimeAddressParamLoader ( ) ,
322273 children : [
323- {
324- path : '' ,
325- Component : ( ) => < NFTTokenTransfersCard { ...useNftDetailsProps ( ) } /> ,
326- } ,
327- {
328- path : 'metadata' ,
329- Component : ( ) => < NFTMetadataCard { ...useNftDetailsProps ( ) } /> ,
330- } ,
274+ { path : '' , Component : ( ) => < NFTTokenTransfersCard { ...useNftDetailsProps ( ) } /> } ,
275+ { path : 'metadata' , Component : ( ) => < NFTMetadataCard { ...useNftDetailsProps ( ) } /> } ,
331276 ] ,
332277 } ,
333278 {
334279 path : `token/:address` ,
335280 element : < TokenDashboardPage /> ,
336281 loader : runtimeAddressParamLoader ( ) ,
337282 children : [
338- {
339- path : '' ,
340- Component : ( ) => < TokenTransfersCard { ...useTokenDashboardProps ( ) } /> ,
341- } ,
342- {
343- path : 'holders' ,
344- Component : ( ) => < TokenHoldersCard { ...useTokenDashboardProps ( ) } /> ,
345- } ,
346- {
347- path : 'inventory' ,
348- Component : ( ) => < TokenInventoryCard { ...useTokenDashboardProps ( ) } /> ,
349- } ,
350- {
351- path : 'code' ,
352- Component : ( ) => < ContractCodeCard { ...useTokenDashboardProps ( ) } /> ,
353- } ,
283+ { path : '' , Component : ( ) => < TokenTransfersCard { ...useTokenDashboardProps ( ) } /> } ,
284+ { path : 'holders' , Component : ( ) => < TokenHoldersCard { ...useTokenDashboardProps ( ) } /> } ,
285+ { path : 'inventory' , Component : ( ) => < TokenInventoryCard { ...useTokenDashboardProps ( ) } /> } ,
286+ { path : 'code' , Component : ( ) => < ContractCodeCard { ...useTokenDashboardProps ( ) } /> } ,
354287 ] ,
355288 } ,
356289 ] ,
0 commit comments