Skip to content

Commit

Permalink
Hide gateway link when a CID is not yet pinned (#2186)
Browse files Browse the repository at this point in the history
* right click on shared folder overview

* hide link when not pinned
  • Loading branch information
Tbaut authored Jun 14, 2022
1 parent 20af84e commit 3c24aa5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/storage-ui/src/Components/Elements/CidRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ const CidRow = ({ pinStatus }: Props) => {
{pinStatus.status}
</TableCell>
<TableCell className={classes.externalIconCell}>
<ExternalIcon
className={classes.icon}
onClick={() => window.open(`${trimChar(IPFS_GATEWAY, "/")}/${pinStatus.pin?.cid}`)}
/>
{pinStatus.status === "pinned" && (
<ExternalIcon
className={classes.icon}
onClick={() => window.open(`${trimChar(IPFS_GATEWAY, "/")}/${pinStatus.pin?.cid}`)}
/>
)}
</TableCell>
<TableCell align="right">
<MenuDropdown
Expand Down

0 comments on commit 3c24aa5

Please sign in to comment.