Skip to content

Commit

Permalink
fix: fix broken links in gnosis chain (#4706)
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin authored Jul 10, 2024
1 parent 562067a commit af8172d
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions apps/explorer/src/components/orders/DetailsTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ import { Order } from 'api/operator'
import { getUiOrderType } from 'utils/getUiOrderType'

import { TAB_QUERY_PARAM_KEY } from '../../../explorer/const'
import { Link } from 'react-router-dom'

const Table = styled(SimpleTable)`
> tbody > tr {
grid-template-columns: 27rem auto;
grid-template-rows: max-content;
padding: 1.4rem 0 1.4rem 1.1rem;
${media.mediumDown} {
grid-template-columns: 17rem auto;
padding: 1.4rem 0;
Expand Down Expand Up @@ -239,12 +238,15 @@ export function DetailsTable(props: DetailsTableProps): React.ReactNode | null {
<HelpTooltip tooltip={tooltip.from} /> From
</td>
<td>

<Wrapper>
<RowWithCopyButton
textToCopy={owner}
onCopy={(): void => onCopy('ownerAddress')}
contentsToDisplay={<LinkWithPrefixNetwork to={getExplorerLink(chainId, owner, ExplorerDataType.ADDRESS)} target='_blank'>{owner}</LinkWithPrefixNetwork>}
contentsToDisplay={
<Link to={getExplorerLink(chainId, owner, ExplorerDataType.ADDRESS)} target="_blank">
{owner}
</Link>
}
/>
<LinkButton to={`/address/${owner}`}>
<FontAwesomeIcon icon={faHistory} />
Expand All @@ -262,14 +264,17 @@ export function DetailsTable(props: DetailsTableProps): React.ReactNode | null {
<RowWithCopyButton
textToCopy={receiver}
onCopy={(): void => onCopy('receiverAddress')}
contentsToDisplay={<LinkWithPrefixNetwork to={getExplorerLink(chainId, receiver, ExplorerDataType.ADDRESS)} target='_blank'>{receiver}</LinkWithPrefixNetwork>}
contentsToDisplay={
<Link to={getExplorerLink(chainId, receiver, ExplorerDataType.ADDRESS)} target="_blank">
{receiver}
</Link>
}
/>
<LinkButton to={`/address/${receiver}`}>
<FontAwesomeIcon icon={faHistory} />
Order History
</LinkButton>
</Wrapper>

</td>
</tr>
{(!partiallyFillable || txHash) && (
Expand All @@ -285,7 +290,11 @@ export function DetailsTable(props: DetailsTableProps): React.ReactNode | null {
<RowWithCopyButton
textToCopy={txHash}
onCopy={(): void => onCopy('settlementTx')}
contentsToDisplay={<LinkWithPrefixNetwork to={getExplorerLink(chainId, txHash, ExplorerDataType.TRANSACTION)} target='_blank'>{txHash}</LinkWithPrefixNetwork>}
contentsToDisplay={
<Link to={getExplorerLink(chainId, txHash, ExplorerDataType.TRANSACTION)} target="_blank">
{txHash}
</Link>
}
/>
<Wrapper gap={false}>
<LinkButton to={`/tx/${txHash}`}>
Expand Down

0 comments on commit af8172d

Please sign in to comment.