Skip to content

Commit 2699307

Browse files
committed
replace use of as any
1 parent aeeb677 commit 2699307

File tree

2 files changed

+61
-61
lines changed

2 files changed

+61
-61
lines changed

website/src/supportedNetworks/components/NetworkDetailsPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ function NetworkDetailsPage({ network }: NetworkDetailsPageProps) {
6666
<div className="grid grid-cols-6 gap-4">
6767
{cards.map((card) => (
6868
<Card
69-
key={t(card.titleKey as any)}
69+
key={t(card.titleKey)}
7070
href={card.href}
71-
title={t(card.titleKey as any)}
72-
description={t(card.descriptionKey as any)}
71+
title={t(card.titleKey)}
72+
description={t(card.descriptionKey)}
7373
slotAboveTitle={<TimeIcon variant="reading" minutes={card.minutes} />}
7474
className="col-span-full [&:nth-child(-n+3)]:lg:col-span-2 [&:nth-child(-n+3)]:lg:min-h-64 [&:nth-child(n+4)]:lg:col-span-3"
7575
icon={card.icon}

website/src/supportedNetworks/components/ResourceCards.tsx

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -9,193 +9,193 @@ import {
99

1010
type Resource = {
1111
href: string
12-
titleKey: string
12+
titleKey: string
1313
descriptionKey: string
1414
minutes: number
1515
icon?: React.ReactNode
1616
}
1717

1818
// EVM + Subgraphs, Substreams and Token API
19-
export const evmWithTokenAPICards: Resource[] = [
19+
export const evmWithTokenAPICards = [
2020
{
2121
href: 'https://thegraph.com/docs/en/subgraphs/quick-start/',
22-
titleKey: 'index.networkGuides.evm.subgraphQuickStart.title',
23-
descriptionKey: 'index.networkGuides.evm.subgraphQuickStart.description',
22+
titleKey: 'index.networkGuides.evm.subgraphQuickStart.title' as const,
23+
descriptionKey: 'index.networkGuides.evm.subgraphQuickStart.description' as const,
2424
minutes: 10,
2525
icon: <Subgraph size={6} />,
26-
},
26+
} ,
2727
{
2828
href: 'https://docs.substreams.dev/',
29-
titleKey: 'index.networkGuides.evm.substreamsQuickStart.title',
30-
descriptionKey: 'index.networkGuides.evm.substreamsQuickStart.description',
29+
titleKey: 'index.networkGuides.evm.substreamsQuickStart.title' as const,
30+
descriptionKey: 'index.networkGuides.evm.substreamsQuickStart.description' as const,
3131
minutes: 15,
3232
icon: <Substreams size={6} />,
3333
},
3434
{
3535
href: 'https://thegraph.com/docs/en/token-api/quick-start/',
36-
titleKey: 'index.networkGuides.evm.tokenapi.title',
37-
descriptionKey: 'index.networkGuides.evm.tokenapi.description',
36+
titleKey: 'index.networkGuides.evm.tokenapi.title' as const,
37+
descriptionKey: 'index.networkGuides.evm.tokenapi.description' as const,
3838
minutes: 8,
3939
icon: <APIToken size={6} />,
4040
},
4141
{
4242
href: 'https://thegraph.com/docs/en/subgraphs/explorer/',
43-
titleKey: 'index.networkGuides.evm.graphExplorer.title',
44-
descriptionKey: 'index.networkGuides.evm.graphExplorer.description',
43+
titleKey: 'index.networkGuides.evm.graphExplorer.title' as const,
44+
descriptionKey: 'index.networkGuides.evm.graphExplorer.description' as const,
4545
minutes: 12,
4646
},
4747
{
4848
href: 'https://substreams.dev/',
49-
titleKey: 'index.networkGuides.evm.substreamsDev.title',
50-
descriptionKey: 'index.networkGuides.evm.substreamsDev.description',
49+
titleKey: 'index.networkGuides.evm.substreamsDev.title' as const,
50+
descriptionKey: 'index.networkGuides.evm.substreamsDev.description' as const,
5151
minutes: 5,
5252
},
53-
]
53+
] satisfies Resource[]
5454

5555
// EVM without Token API
56-
export const evmNoTokenAPICards: Resource[] = [
56+
export const evmNoTokenAPICards = [
5757
{
5858
href: 'https://thegraph.com/docs/en/subgraphs/quick-start/',
59-
titleKey: 'index.networkGuides.evm.subgraphQuickStart.title',
60-
descriptionKey: 'index.networkGuides.evm.subgraphQuickStart.description',
59+
titleKey: 'index.networkGuides.evm.subgraphQuickStart.title' as const,
60+
descriptionKey: 'index.networkGuides.evm.subgraphQuickStart.description' as const,
6161
minutes: 10,
6262
icon: <Subgraph size={6} />,
6363
},
6464
{
6565
href: 'https://thegraph.com/docs/en/substreams/quick-start/',
66-
titleKey: 'index.networkGuides.evm.substreamsQuickStart.title',
67-
descriptionKey: 'index.networkGuides.evm.substreamsQuickStart.description',
66+
titleKey: 'index.networkGuides.evm.substreamsQuickStart.title' as const,
67+
descriptionKey: 'index.networkGuides.evm.substreamsQuickStart.description' as const,
6868
minutes: 15,
6969
icon: <Substreams size={6} />,
7070
},
7171
{
7272
href: 'https://thegraph.com/docs/en/subgraphs/billing/',
73-
titleKey: 'index.networkGuides.evm.billing.title',
74-
descriptionKey: 'index.networkGuides.evm.billing.description',
73+
titleKey: 'index.networkGuides.evm.billing.title' as const,
74+
descriptionKey: 'index.networkGuides.evm.billing.description' as const,
7575
minutes: 5,
7676
icon: <Substreams size={6} />,
7777
},
7878
{
7979
href: 'https://thegraph.com/docs/en/subgraphs/explorer/',
80-
titleKey: 'index.networkGuides.evm.graphExplorer.title',
81-
descriptionKey: 'index.networkGuides.evm.graphExplorer.description',
80+
titleKey: 'index.networkGuides.evm.graphExplorer.title' as const,
81+
descriptionKey: 'index.networkGuides.evm.graphExplorer.description' as const,
8282
minutes: 12,
8383
},
8484
{
8585
href: 'https://substreams.dev/',
86-
titleKey: 'index.networkGuides.evm.substreamsDev.title',
87-
descriptionKey: 'index.networkGuides.evm.substreamsDev.description',
86+
titleKey: 'index.networkGuides.evm.substreamsDev.title' as const,
87+
descriptionKey: 'index.networkGuides.evm.substreamsDev.description' as const,
8888
minutes: 5,
8989
},
9090
]
9191

9292
// EVM only Subgraphs
93-
export const evmSubgraphsOnlyCards: Resource[] = [
93+
export const evmSubgraphsOnlyCards = [
9494
{
9595
href: 'https://thegraph.com/docs/en/subgraphs/quick-start/',
96-
titleKey: 'index.networkGuides.evm.subgraphQuickStart.title',
97-
descriptionKey: 'index.networkGuides.evm.subgraphQuickStart.description',
96+
titleKey: 'index.networkGuides.evm.subgraphQuickStart.title' as const,
97+
descriptionKey: 'index.networkGuides.evm.subgraphQuickStart.description' as const,
9898
minutes: 10,
9999
icon: <Subgraph size={6} />,
100100
},
101101
{
102102
href: 'https://thegraph.com/docs/en/subgraphs/explorer/',
103-
titleKey: 'index.networkGuides.evm.graphExplorer.title',
104-
descriptionKey: 'index.networkGuides.evm.graphExplorer.description',
103+
titleKey: 'index.networkGuides.evm.graphExplorer.title' as const,
104+
descriptionKey: 'index.networkGuides.evm.graphExplorer.description' as const,
105105
minutes: 12,
106106
icon: <GraphExplorer size={6} />,
107107
},
108108
{
109109
href: 'https://thegraph.com/docs/en/subgraphs/billing/',
110-
titleKey: 'index.networkGuides.evm.billing.title',
111-
descriptionKey: 'index.networkGuides.evm.billing.description',
110+
titleKey: 'index.networkGuides.evm.billing.title' as const,
111+
descriptionKey: 'index.networkGuides.evm.billing.description' as const,
112112
minutes: 5,
113113
icon: <MoneyWavy alt="Money" size={6} />,
114114
},
115115
{
116116
href: 'https://thegraph.com/docs/en/subgraphs/best-practices/timeseries/',
117-
titleKey: 'index.networkGuides.evm.timeseries.title',
118-
descriptionKey: 'index.networkGuides.evm.timeseries.description',
117+
titleKey: 'index.networkGuides.evm.timeseries.title' as const,
118+
descriptionKey: 'index.networkGuides.evm.timeseries.description' as const,
119119
minutes: 5,
120120
},
121121
{
122122
href: 'https://thegraph.com/docs/en/subgraphs/developing/creating/advanced/',
123-
titleKey: 'index.networkGuides.evm.advancedFeatures.title',
124-
descriptionKey: 'index.networkGuides.evm.advancedFeatures.description',
123+
titleKey: 'index.networkGuides.evm.advancedFeatures.title' as const,
124+
descriptionKey: 'index.networkGuides.evm.advancedFeatures.description' as const,
125125
minutes: 7,
126126
},
127127
]
128128

129129
// Non-EVM + Token API
130-
export const nonEvmWithTokenAPICards: Resource[] = [
130+
export const nonEvmWithTokenAPICards = [
131131
{
132132
href: 'https://docs.substreams.dev/',
133-
titleKey: 'index.networkGuides.nonEvm.officialDocs.title',
134-
descriptionKey: 'index.networkGuides.nonEvm.officialDocs.description',
133+
titleKey: 'index.networkGuides.nonEvm.officialDocs.title' as const,
134+
descriptionKey: 'index.networkGuides.nonEvm.officialDocs.description' as const,
135135
minutes: 15,
136136
icon: <Substreams size={6} />,
137137
},
138138
{
139139
href: 'https://thegraph.com/docs/en/sps/introduction/',
140-
titleKey: 'index.networkGuides.nonEvm.spsIntro.title',
141-
descriptionKey: 'index.networkGuides.nonEvm.spsIntro.description',
140+
titleKey: 'index.networkGuides.nonEvm.spsIntro.title' as const,
141+
descriptionKey: 'index.networkGuides.nonEvm.spsIntro.description' as const,
142142
minutes: 8,
143143
icon: <SubstreamsPoweredSubgraph size={6} />,
144144
},
145145
{
146146
href: 'https://substreams.dev/',
147-
titleKey: 'index.networkGuides.nonEvm.substreamsDev.title',
148-
descriptionKey: 'index.networkGuides.nonEvm.substreamsDev.description',
147+
titleKey: 'index.networkGuides.nonEvm.substreamsDev.title' as const,
148+
descriptionKey: 'index.networkGuides.nonEvm.substreamsDev.description' as const,
149149
minutes: 10,
150150
icon: <Substreams size={6} />,
151151
},
152152
{
153153
href: 'https://github.com/streamingfast/substreams-starter',
154-
titleKey: 'index.networkGuides.nonEvm.substreamsStarter.title',
155-
descriptionKey: 'index.networkGuides.nonEvm.substreamsStarter.description',
154+
titleKey: 'index.networkGuides.nonEvm.substreamsStarter.title' as const,
155+
descriptionKey: 'index.networkGuides.nonEvm.substreamsStarter.description' as const,
156156
minutes: 5,
157157
},
158158
{
159159
href: 'https://github.com/streamingfast/substreams',
160-
titleKey: 'index.networkGuides.nonEvm.substreamsRepo.title',
161-
descriptionKey: 'index.networkGuides.nonEvm.substreamsRepo.description',
160+
titleKey: 'index.networkGuides.nonEvm.substreamsRepo.title' as const,
161+
descriptionKey: 'index.networkGuides.nonEvm.substreamsRepo.description' as const,
162162
minutes: 7,
163163
},
164164
]
165165

166166
// Non-EVM without Token API
167-
export const nonEvmNoTokenAPICards: Resource[] = [
167+
export const nonEvmNoTokenAPICards = [
168168
{
169169
href: 'https://thegraph.com/docs/en/substreams/quick-start/',
170-
titleKey: 'index.networkGuides.evm.substreamsQuickStart.title',
171-
descriptionKey: 'index.networkGuides.evm.substreamsQuickStart.description',
170+
titleKey: 'index.networkGuides.evm.substreamsQuickStart.title' as const,
171+
descriptionKey: 'index.networkGuides.evm.substreamsQuickStart.description' as const,
172172
minutes: 15,
173173
icon: <Substreams size={6} />,
174174
},
175175
{
176176
href: 'https://substreams.dev/',
177-
titleKey: 'index.networkGuides.nonEvm.substreamsDev.title',
178-
descriptionKey: 'index.networkGuides.nonEvm.substreamsDev.description',
177+
titleKey: 'index.networkGuides.nonEvm.substreamsDev.title' as const,
178+
descriptionKey: 'index.networkGuides.nonEvm.substreamsDev.description' as const,
179179
minutes: 10,
180180
icon: <Substreams size={6} />,
181181
},
182182
{
183183
href: 'https://docs.substreams.dev/how-to-guides/sinks',
184-
titleKey: 'index.networkGuides.nonEvm.customSubstreamsSinks.title',
185-
descriptionKey: 'index.networkGuides.nonEvm.customSubstreamsSinks.description',
184+
titleKey: 'index.networkGuides.nonEvm.customSubstreamsSinks.title' as const,
185+
descriptionKey: 'index.networkGuides.nonEvm.customSubstreamsSinks.description' as const,
186186
minutes: 8,
187187
icon: <Substreams size={6} />,
188188
},
189189
{
190190
href: 'https://github.com/streamingfast/substreams-starter',
191-
titleKey: 'index.networkGuides.nonEvm.substreamsStarter.title',
192-
descriptionKey: 'index.networkGuides.nonEvm.substreamsStarter.description',
191+
titleKey: 'index.networkGuides.nonEvm.substreamsStarter.title' as const,
192+
descriptionKey: 'index.networkGuides.nonEvm.substreamsStarter.description' as const,
193193
minutes: 5,
194194
},
195195
{
196196
href: 'https://github.com/streamingfast/substreams',
197-
titleKey: 'index.networkGuides.nonEvm.substreamsRepo.title',
198-
descriptionKey: 'index.networkGuides.nonEvm.substreamsRepo.description',
197+
titleKey: 'index.networkGuides.nonEvm.substreamsRepo.title' as const,
198+
descriptionKey: 'index.networkGuides.nonEvm.substreamsRepo.description' as const,
199199
minutes: 7,
200200
},
201201
]

0 commit comments

Comments
 (0)