Skip to content

Commit

Permalink
Address links to etherscan
Browse files Browse the repository at this point in the history
  • Loading branch information
makiBaraba committed Mar 16, 2023
1 parent ad69817 commit 97ba4c1
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styled from 'styled-components';
import React, { useMemo } from 'react';
import { Column, usePagination, useTable } from 'react-table';
import {
Arrow,
NoDataContainer,
NoDataLabel,
OverlayContainer,
Expand All @@ -25,6 +26,7 @@ import useLoeaderboardByGuessedCorrectlyQuery, {
import { useTranslation } from 'react-i18next';
import Tooltip from 'components/Tooltip';
import { TooltipStyle } from '../TableByVolume/TableByVolume';
import { getEtherscanAddressLink } from 'utils/etherscan';

type TableByGuessedCorrectlyProps = {
searchText: string;
Expand All @@ -44,7 +46,18 @@ const TableByGuessedCorrectly: React.FC<TableByGuessedCorrectlyProps> = ({ searc
{
Header: <>{t('march-madness.leaderboard.address')}</>,
accessor: 'walletAddress',
Cell: (cellProps) => <>{truncateAddress(cellProps.cell.value, 5)}</>,
Cell: (cellProps) => (
<>
{truncateAddress(cellProps.cell.value, 5)}
<a
href={getEtherscanAddressLink(networkId, cellProps.cell.value)}
target="_blank"
rel="noreferrer"
>
<Arrow />
</a>
</>
),
},
{
Header: () => (
Expand Down

0 comments on commit 97ba4c1

Please sign in to comment.