diff --git a/src/components/FileCellRender/FileCell.css b/src/components/FileCellRender/FileCell.css index cd5520c..3c0a853 100644 --- a/src/components/FileCellRender/FileCell.css +++ b/src/components/FileCellRender/FileCell.css @@ -3,6 +3,10 @@ gap: 0.75rem; } +.fileCell-cid { + white-space: nowrap; +} + .fileCell-subtitle { display: flex; align-items: center; diff --git a/src/components/FileCellRender/FIleCell.tsx b/src/components/FileCellRender/FileCell.tsx similarity index 66% rename from src/components/FileCellRender/FIleCell.tsx rename to src/components/FileCellRender/FileCell.tsx index ff5190a..c1fdff4 100644 --- a/src/components/FileCellRender/FIleCell.tsx +++ b/src/components/FileCellRender/FileCell.tsx @@ -32,23 +32,29 @@ export function FileCell({ requestId, purchaseCid }: Props) { }); }, [requestId]); - let name = metadata.name; + let name = metadata.name.slice(0, 10); - if (name.length > 10) { - const [filename, ext] = metadata.name.split("."); - name = filename.slice(0, 10) + "..." + ext; + if (metadata.name.length > 10) { + // const [filename, ext] = metadata.name.split("."); + // name = filename.slice(0, 10) + "..." + ext; + name += "..."; } - const cidTruncated = cid.slice(0, 5) + ".".repeat(5) + cid.slice(-5); + // const cidTruncated = cid.slice(0, 5) + ".".repeat(5) + cid.slice(-5); + const cidTruncated = cid.slice(0, 10) + "..."; return ( <>