@@ -3,9 +3,9 @@ import type { ComponentPropsWithoutRef } from 'react'
33import { memo } from 'react'
44
55import { classNames } from '@edgeandnode/gds'
6- import { Clock , Subgraph , Substreams , SubstreamsPoweredSubgraph } from '@edgeandnode/gds/icons'
6+ import { Subgraph , Substreams , SubstreamsPoweredSubgraph } from '@edgeandnode/gds/icons'
77
8- import { Card } from '@/components'
8+ import { Card , TimeIcon } from '@/components'
99import { useI18n } from '@/i18n'
1010import { isNonEVMNetwork } from '@/utils/networkUtils'
1111
@@ -21,30 +21,6 @@ type NetworkDetailsPageProps = {
2121 }
2222}
2323
24- const Time = memo (
25- ( {
26- variant,
27- minutes,
28- className,
29- ...props
30- } : ComponentPropsWithoutRef < 'div' > & {
31- variant : 'reading' | 'duration'
32- minutes : number
33- } ) => {
34- const { t } = useI18n ( )
35- return (
36- < div className = { classNames ( [ 'flex items-center gap-1 leading-none' , className ] ) } { ...props } >
37- < Clock
38- alt = { variant === 'reading' ? t ( 'index.time.reading' ) : t ( 'index.time.duration' ) }
39- variant = "fill"
40- size = { 3.5 }
41- />
42- { minutes } { t ( 'index.time.minutes' ) }
43- </ div >
44- )
45- } ,
46- )
47-
4824const EVMResources = memo ( ( ) => {
4925 const { t } = useI18n ( )
5026
@@ -55,51 +31,39 @@ const EVMResources = memo(() => {
5531 href = "https://thegraph.com/docs/en/subgraphs/quick-start/"
5632 title = { t ( 'index.networkGuides.evm.subgraphQuickStart.title' ) }
5733 description = { t ( 'index.networkGuides.evm.subgraphQuickStart.description' ) }
58- slotAboveTitle = { < Time variant = "reading" minutes = { 10 } /> }
34+ slotAboveTitle = { < TimeIcon variant = "reading" minutes = { 10 } /> }
5935 className = "min-h-[252px]"
60- icon = {
61- < div className = "flex size-8 items-center justify-center text-white" >
62- < Subgraph size = { 6 } />
63- </ div >
64- }
36+ icon = { < Subgraph size = { 6 } /> }
6537 />
6638 < Card
6739 href = "https://docs.substreams.dev/"
6840 title = { t ( 'index.networkGuides.evm.substreams.title' ) }
6941 description = { t ( 'index.networkGuides.evm.substreams.description' ) }
70- slotAboveTitle = { < Time variant = "reading" minutes = { 15 } /> }
42+ slotAboveTitle = { < TimeIcon variant = "reading" minutes = { 15 } /> }
7143 className = "min-h-[252px]"
72- icon = {
73- < div className = "flex size-8 items-center justify-center text-white" >
74- < Substreams size = { 6 } />
75- </ div >
76- }
44+ icon = { < Substreams size = { 6 } /> }
7745 />
7846 < Card
7947 href = "https://thegraph.com/docs/en/subgraphs/best-practices/timeseries/"
8048 title = { t ( 'index.networkGuides.evm.timeseries.title' ) }
8149 description = { t ( 'index.networkGuides.evm.timeseries.description' ) }
82- slotAboveTitle = { < Time variant = "reading" minutes = { 8 } /> }
50+ slotAboveTitle = { < TimeIcon variant = "reading" minutes = { 8 } /> }
8351 className = "min-h-[252px]"
84- icon = {
85- < div className = "flex size-8 items-center justify-center text-white" >
86- < Substreams size = { 6 } />
87- </ div >
88- }
52+ icon = { < Substreams size = { 6 } /> }
8953 />
9054 </ div >
9155 < div className = "grid grid-cols-1 gap-4 sm:grid-cols-2" >
9256 < Card
9357 href = "https://thegraph.com/docs/en/subgraphs/developing/creating/advanced/"
9458 title = { t ( 'index.networkGuides.evm.advancedFeatures.title' ) }
9559 description = { t ( 'index.networkGuides.evm.advancedFeatures.description' ) }
96- slotAboveTitle = { < Time variant = "reading" minutes = { 12 } /> }
60+ slotAboveTitle = { < TimeIcon variant = "reading" minutes = { 12 } /> }
9761 />
9862 < Card
9963 href = "https://thegraph.com/docs/en/subgraphs/billing/"
10064 title = { t ( 'index.networkGuides.evm.billing.title' ) }
10165 description = { t ( 'index.networkGuides.evm.billing.description' ) }
102- slotAboveTitle = { < Time variant = "reading" minutes = { 5 } /> }
66+ slotAboveTitle = { < TimeIcon variant = "reading" minutes = { 5 } /> }
10367 />
10468 </ div >
10569 </ div >
@@ -116,58 +80,45 @@ const NonEVMResources = memo(() => {
11680 href = "https://docs.substreams.dev/"
11781 title = { t ( 'index.networkGuides.nonEvm.officialDocs.title' ) }
11882 description = { t ( 'index.networkGuides.nonEvm.officialDocs.description' ) }
119- slotAboveTitle = { < Time variant = "reading" minutes = { 15 } /> }
83+ slotAboveTitle = { < TimeIcon variant = "reading" minutes = { 15 } /> }
12084 className = "min-h-[252px]"
121- icon = {
122- < div className = "flex size-8 items-center justify-center text-white" >
123- < Substreams size = { 6 } />
124- </ div >
125- }
85+ icon = { < Substreams size = { 6 } /> }
12686 />
12787 < Card
12888 href = "https://thegraph.com/docs/en/sps/introduction/"
12989 title = { t ( 'index.networkGuides.nonEvm.spsIntro.title' ) }
13090 description = { t ( 'index.networkGuides.nonEvm.spsIntro.description' ) }
131- slotAboveTitle = { < Time variant = "reading" minutes = { 8 } /> }
91+ slotAboveTitle = { < TimeIcon variant = "reading" minutes = { 8 } /> }
13292 className = "min-h-[252px]"
133- icon = {
134- < div className = "flex size-8 items-center justify-center text-white" >
135- < SubstreamsPoweredSubgraph size = { 6 } />
136- </ div >
137- }
93+ icon = { < SubstreamsPoweredSubgraph size = { 6 } /> }
13894 />
13995 < Card
14096 href = "https://substreams.dev/"
14197 title = { t ( 'index.networkGuides.nonEvm.substreamsDev.title' ) }
14298 description = { t ( 'index.networkGuides.nonEvm.substreamsDev.description' ) }
143- slotAboveTitle = { < Time variant = "reading" minutes = { 10 } /> }
99+ slotAboveTitle = { < TimeIcon variant = "reading" minutes = { 10 } /> }
144100 className = "min-h-[252px]"
145- icon = {
146- < div className = "flex size-8 items-center justify-center text-white" >
147- < Substreams size = { 6 } />
148- </ div >
149- }
101+ icon = { < Substreams size = { 6 } /> }
150102 />
151103 </ div >
152104 < div className = "grid grid-cols-1 gap-4 sm:grid-cols-2" >
153105 < Card
154106 href = "https://github.com/streamingfast/substreams-starter"
155107 title = { t ( 'index.networkGuides.nonEvm.substreamsStarter.title' ) }
156108 description = { t ( 'index.networkGuides.nonEvm.substreamsStarter.description' ) }
157- slotAboveTitle = { < Time variant = "reading" minutes = { 5 } /> }
109+ slotAboveTitle = { < TimeIcon variant = "reading" minutes = { 5 } /> }
158110 />
159111 < Card
160112 href = "https://github.com/streamingfast/substreams"
161113 title = { t ( 'index.networkGuides.nonEvm.substreamsRepo.title' ) }
162114 description = { t ( 'index.networkGuides.nonEvm.substreamsRepo.description' ) }
163- slotAboveTitle = { < Time variant = "reading" minutes = { 7 } /> }
115+ slotAboveTitle = { < TimeIcon variant = "reading" minutes = { 7 } /> }
164116 />
165117 </ div >
166118 </ div >
167119 )
168120} )
169121
170- Time . displayName = 'Time'
171122EVMResources . displayName = 'EVMResources'
172123NonEVMResources . displayName = 'NonEVMResources'
173124
0 commit comments