@@ -2,14 +2,12 @@ import { motion } from 'framer-motion'
22import NextLink from 'next/link'
33import { memo } from 'react'
44
5- import { ExperimentalCopyButton , Skeleton , Text } from '@edgeandnode/gds'
5+ import { ExperimentalCopyButton , Skeleton } from '@edgeandnode/gds'
66import { Check } from '@edgeandnode/gds/icons'
77import { NetworkIcon } from '@edgeandnode/go'
88
99import { getIconVariant , shouldShowSkeleton } from '@/supportedNetworks/utils'
1010
11- const MotionTR = motion . tr
12-
1311interface NetworkRowProps {
1412 network : {
1513 id : string
@@ -25,55 +23,58 @@ interface NetworkRowProps {
2523
2624export const NetworkRow = memo ( ( { network, locale } : NetworkRowProps ) => {
2725 return (
28- < NextLink href = { `/${ locale } /supported-networks/${ network . id } ` } legacyBehavior passHref >
29- < MotionTR
30- className = "group h-16 cursor-pointer transition-colors hover:bg-space-1600"
31- initial = { { opacity : 0 , y : 16 } }
32- animate = { { opacity : 1 , y : 0 } }
33- exit = { {
34- opacity : 0 ,
35- y : - 16 ,
36- transition : {
37- duration : 0.1 ,
38- ease : 'easeIn' ,
39- } ,
40- } }
41- transition = { {
42- duration : 0.2 ,
43- ease : 'easeOut' ,
44- } }
45- layoutId = { network . id }
46- >
47- < td className = "w-48" >
26+ < motion . tr
27+ className = "group h-16 cursor-pointer transition-colors hover:bg-space-1600"
28+ initial = { { opacity : 0 , y : 16 } }
29+ animate = { { opacity : 1 , y : 0 } }
30+ exit = { {
31+ opacity : 0 ,
32+ y : - 16 ,
33+ transition : {
34+ duration : 0.1 ,
35+ ease : 'easeIn' ,
36+ } ,
37+ } }
38+ transition = { {
39+ duration : 0.2 ,
40+ ease : 'easeOut' ,
41+ } }
42+ layoutId = { network . id }
43+ >
44+ < td className = "static min-w-48" >
45+ < NextLink
46+ href = { `/${ locale } /supported-networks/${ network . id } ` }
47+ className = "absolute inset-0 z-10 flex size-full items-center px-3.5 py-2.5 -outline-offset-2"
48+ >
4849 < div className = "flex items-center gap-2" >
4950 { shouldShowSkeleton ( network . id ) ? (
5051 < Skeleton borderRadius = "FULL" height = "20px" width = "20px" />
5152 ) : (
5253 < NetworkIcon variant = { getIconVariant ( network . id ) } caip2Id = { network . caip2Id as any } size = { 5 } />
5354 ) }
54- < Text . P14 > { network . shortName } </ Text . P14 >
55+ < span className = "text-p14" > { network . shortName } </ span >
5556 </ div >
56- </ td >
57- < td className = "w-48" >
58- < div className = "flex w-full items-center justify-between gap-2 " >
59- < Text . P14 className = "!mb-0" > { network . id } </ Text . P14 >
60- < div className = "opacity-0 transition-opacity group-hover:opacity-100" >
61- < div
62- onClick = { ( e ) => {
63- e . preventDefault ( )
64- e . stopPropagation ( )
65- } }
66- >
67- < ExperimentalCopyButton size = "small" variant = "tertiary" value = { network . id } / >
68- </ div >
57+ </ NextLink >
58+ </ td >
59+ < td className = "w-48 " >
60+ < div className = "flex w-full items-center justify-between gap-2" >
61+ < span className = "text-p14 !mb-0" > { network . id } </ span >
62+ < div className = "z-20 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100" >
63+ < div
64+ onClick = { ( e ) => {
65+ e . preventDefault ( )
66+ e . stopPropagation ( )
67+ } }
68+ >
69+ < ExperimentalCopyButton size = "small" variant = "tertiary" value = { network . id } / >
6970 </ div >
7071 </ div >
71- </ td >
72- < td align = "center" > { network . subgraphs ? < Check size = { 4 } alt = "Checkmark" /> : null } </ td >
73- < td align = "center" > { network . substreams ? < Check size = { 4 } alt = "Checkmark" /> : null } </ td >
74- < td align = "center" > { network . firehose ? < Check size = { 4 } alt = "Checkmark" /> : null } </ td >
75- < td align = "center" > { network . tokenapi ? < Check size = { 4 } alt = "Checkmark" /> : null } </ td >
76- </ MotionTR >
77- </ NextLink >
72+ </ div >
73+ </ td >
74+ < td align = "center" > { network . subgraphs ? < Check size = { 4 } alt = "Checkmark" /> : null } </ td >
75+ < td align = "center" > { network . substreams ? < Check size = { 4 } alt = "Checkmark" /> : null } </ td >
76+ < td align = "center" > { network . firehose ? < Check size = { 4 } alt = "Checkmark" /> : null } </ td >
77+ < td align = "center" > { network . tokenapi ? < Check size = { 4 } alt = "Checkmark" /> : null } </ td >
78+ </ motion . tr >
7879 )
7980} )
0 commit comments