Skip to content

Commit

Permalink
fix: Removed mistakenly generated link on CID header item in filemana…
Browse files Browse the repository at this point in the history
…ger (#1336)
  • Loading branch information
svvimming committed May 18, 2022
1 parent 2dd88f4 commit 83201cf
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions packages/website/components/account/filesManager/fileRowItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const FileRowItem = props => {
const statusMessages = fileRowLabels.status.tooltip;
/** @type {import('react').RefObject<HTMLTextAreaElement>} */
const editingNameRef = useRef(null);
const truncatedCID = useMemo(() => truncateString(cid, 5, '...', 'double'), [cid]);
const statusTooltip = useMemo(
() =>
({
Expand Down Expand Up @@ -125,14 +126,18 @@ const FileRowItem = props => {
<Tooltip content={fileRowLabels.cid.tooltip} />
{fileRowLabels.cid.label}
</span>
<a
className="cid-truncate underline medium-up-only"
href={`https://dweb.link/ipfs/${cid}`}
target="_blank"
rel="noreferrer"
>
{useMemo(() => truncateString(cid, 5, '...', 'double'), [cid])}
</a>
{isHeader ? (
<span className="cid-full medium-up-only">{cid}</span>
) : (
<a
className="cid-truncate underline medium-up-only"
href={`https://dweb.link/ipfs/${cid}`}
target="_blank"
rel="noreferrer"
>
{truncatedCID}
</a>
)}
<span className="cid-full medium-down-only">{cid}</span>
{isHeader ? (
<Tooltip content={fileRowLabels.cid.tooltip} />
Expand Down

0 comments on commit 83201cf

Please sign in to comment.