@@ -166,6 +166,22 @@ const CopyableAddress = ({
166166 )
167167}
168168
169+ const getNetworkStatusUrl = ( network : NetworkData ) : string | null => {
170+ if ( network . networkStatus ) {
171+ return network . networkStatus
172+ }
173+
174+ if ( network . mainnet ?. explorerUrl ) {
175+ try {
176+ return new URL ( network . mainnet . explorerUrl . replace ( "%s" , "" ) ) . origin
177+ } catch {
178+ return null
179+ }
180+ }
181+
182+ return null
183+ }
184+
169185const DefaultTHead = ( { showExtraDetails, networkName } : { showExtraDetails : boolean ; networkName : string } ) => {
170186 const isAptosNetwork = networkName === "Aptos Mainnet" || networkName === "Aptos Testnet"
171187
@@ -495,6 +511,7 @@ export const StreamsNetworkAddressesTable = () => {
495511 </ thead >
496512 < tbody >
497513 { filteredNetworks . map ( ( network : NetworkData , index : number ) => {
514+ const statusUrl = getNetworkStatusUrl ( network )
498515 return (
499516 < Fragment key = { network . network } >
500517 { network . mainnet &&
@@ -598,18 +615,19 @@ export const StreamsNetworkAddressesTable = () => {
598615 </ td >
599616 </ tr >
600617 ) }
601-
602- { network . networkStatus && (
603- < tr key = { `${ network . network } -status` } className = { tableStyles . statusRow } >
618+ { statusUrl && (
619+ < tr key = { `${ network . network } -status-explorer` } className = { tableStyles . statusRow } >
604620 < td colSpan = { 3 } className = { tableStyles . statusCell } >
605- < a
606- href = { network . networkStatus }
607- target = "_blank"
608- rel = "noopener noreferrer"
609- className = { tableStyles . statusLink }
610- >
611- View { network . network } Network Status →
612- </ a >
621+ < div style = { { display : "flex" , gap : "1rem" , justifyContent : "flex-end" } } >
622+ < a
623+ href = { statusUrl }
624+ target = "_blank"
625+ rel = "noopener noreferrer"
626+ className = { tableStyles . statusLink }
627+ >
628+ View { network . network } Network Status →
629+ </ a >
630+ </ div >
613631 </ td >
614632 </ tr >
615633 ) }
0 commit comments