Skip to content
This repository was archived by the owner on Apr 4, 2022. It is now read-only.

Commit

Permalink
[Explorer] Make internal links open in the same tab - external links …
Browse files Browse the repository at this point in the history
…in another one (#1029)

# Summary

Closes #1020 

Added `_self` to internal links to open same tab.
Added `_blank` to external links to open another tab.

# To Test
1. Open a page with links. i.e : `address/0xb6bad41ae76a11d10f7b0e664c5007b908bc77c9`
     * Click on a Token link or address next to the `User Details` title. Those links will be opened in another tab.
     * Click on an order link in the table. Those links will be opened in the same tab.
  • Loading branch information
matextrem authored Feb 5, 2022
1 parent 3035569 commit ef32c77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/orders/OrdersUserDetailsTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const RowOrder: React.FC<RowProps> = ({ order, isPriceInverted }) => {
className="span-copybtn-wrap"
textToCopy={uid}
contentsToDisplay={
<LinkWithPrefixNetwork to={`/orders/${order.uid}`} rel="noopener noreferrer" target="_blank">
<LinkWithPrefixNetwork to={`/orders/${order.uid}`} rel="noopener noreferrer" target="_self">
{shortId}
</LinkWithPrefixNetwork>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/transaction/TransactionTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const RowTransaction: React.FC<RowProps> = ({ order, isPriceInverted, invertLimi
className="span-copybtn-wrap"
textToCopy={uid}
contentsToDisplay={
<LinkWithPrefixNetwork to={`/orders/${order.uid}`} rel="noopener noreferrer" target="_blank">
<LinkWithPrefixNetwork to={`/orders/${order.uid}`} rel="noopener noreferrer" target="_self">
{getShortOrderId(shortId)}
</LinkWithPrefixNetwork>
}
Expand Down

0 comments on commit ef32c77

Please sign in to comment.