Skip to content

Commit d270a71

Browse files
committed
chore: address review
1 parent 9e11e01 commit d270a71

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

src/app/service-providers/data/column-definition.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { ID } from '@filecoin-foundation/ui-filecoin/Table/ID'
22
import { YesNoStatus } from '@filecoin-foundation/ui-filecoin/Table/YesNoStatus'
3-
import { ExternalTextLink } from '@filecoin-foundation/ui-filecoin/TextLink/ExternalTextLink'
43
import { createColumnHelper } from '@tanstack/react-table'
54

65
import { CompactPeerID } from '@/components/CompactPeerID'
6+
import { PdpScanLink } from '@/components/PdpScanLink'
77
import { ProviderOverview } from '@/components/ProviderOverview'
88
import { SoftwareVersion } from '@/components/SoftwareVersion'
99

@@ -55,9 +55,10 @@ export const columns = [
5555
columnHelper.accessor('checkActivityUrl', {
5656
header: 'Check Activity',
5757
cell: (info) => (
58-
<ExternalTextLink href={info.getValue()}>
59-
View on PDP Scan
60-
</ExternalTextLink>
58+
<PdpScanLink
59+
pdpScanUrl={info.getValue()}
60+
providerName={info.row.original.name}
61+
/>
6162
),
6263
enableSorting: false,
6364
}),

src/app/warm-storage-service/data/column-definition.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { ID } from '@filecoin-foundation/ui-filecoin/Table/ID'
2-
import { ExternalTextLink } from '@filecoin-foundation/ui-filecoin/TextLink/ExternalTextLink'
32
import { createColumnHelper } from '@tanstack/react-table'
43

54
import { CompactPeerID } from '@/components/CompactPeerID'
5+
import { PdpScanLink } from '@/components/PdpScanLink'
66
import { ProviderOverview } from '@/components/ProviderOverview'
77
import { SoftwareVersion } from '@/components/SoftwareVersion'
88

@@ -48,9 +48,10 @@ export const columns = [
4848
columnHelper.accessor('checkActivityUrl', {
4949
header: 'Check Activity',
5050
cell: (info) => (
51-
<ExternalTextLink href={info.getValue()}>
52-
View on PDP Scan
53-
</ExternalTextLink>
51+
<PdpScanLink
52+
pdpScanUrl={info.getValue()}
53+
providerName={info.row.original.name}
54+
/>
5455
),
5556
enableSorting: false,
5657
}),

src/components/PdpScanLink.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { ExternalTextLink } from '@filecoin-foundation/ui-filecoin/TextLink/ExternalTextLink'
2+
3+
type PdpScanLinkProps = {
4+
pdpScanUrl: string
5+
providerName: string
6+
}
7+
8+
export function PdpScanLink({ pdpScanUrl, providerName }: PdpScanLinkProps) {
9+
return (
10+
<ExternalTextLink
11+
href={pdpScanUrl}
12+
aria-label={`View activity for provider ${providerName} on PDP Scan`}
13+
>
14+
View on PDP Scan
15+
</ExternalTextLink>
16+
)
17+
}

src/services/providers/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ async function enrichProviders(
8585
providers: BaseProviderData[],
8686
network: Network,
8787
): Promise<ServiceProvider[]> {
88-
const providersWithVersions: Array<
89-
BaseProviderData & { softwareVersion?: string; checkActivityUrl?: string }
90-
> = []
88+
const providersWithVersions: ServiceProvider[] = []
9189

9290
// Process providers in batches
9391
for (let i = 0; i < providers.length; i += VERSION_FETCH_CONCURRENCY) {

0 commit comments

Comments
 (0)