Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CID links in files table #1243

Merged
merged 3 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,14 @@ const FileRowItem = props => {
<Tooltip content={fileRowLabels.cid.tooltip} />
{fileRowLabels.cid.label}
</span>
<span className="cid-truncate medium-up-only">
<a
className="cid-truncate underline medium-up-only"
href={`https://dweb.link/ipfs/${cid}`}
target="_blank"
rel="noreferrer"
>
{useMemo(() => truncateString(cid, 5, '...', 'double'), [cid])}
</span>
</a>
<span className="cid-full medium-down-only">{cid}</span>
{isHeader ? (
<Tooltip content={fileRowLabels.cid.tooltip} />
Expand Down
6 changes: 3 additions & 3 deletions packages/website/pages/api/user/uploads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ export const files = [
{
_id: '315318962238628132',
type: 'Car',
name: '5126a4-view-all-xrays.dat',
name: 'Energy Efficiency Programming Languages 2018.pdf',
created: '2021-12-17T20:04:45.427+00:00',
updated: '2021-12-17T20:04:45.427+00:00',
cid: 'bafybeiewemrhochdwcr5orsjm2cmqnbl7oqeppgn356lirtjqfucxsxyq41',
cid: 'bafybeig4vkvymf5p2ri747cuiaw3bzbjaxtdvb365vqqnb6f3nzdrvd4ym',
dagSize: 25189,
pins: [],
deals: [],
Expand All @@ -16,7 +16,7 @@ export const files = [
name: '2021-human-genome-sequence-trials-kyoto-jp.toml',
created: '2021-12-01T01:41:03.681+00:00',
updated: '2021-12-01T01:41:03.681+00:00',
cid: 'bafybeih7oh42dqynvdjio7icegtbdbn4mvhr5wu7a4umm2sfgws362kkma2',
cid: 'bafybeicsabmjzr4vrok3asajmvmdsra7qhxlj2wfg6vv2ua5vweda6a74e',
dagSize: 41538,
pins: [
{
Expand Down