From fc6c719c29858c8106009598c310c4977ccd37e1 Mon Sep 17 00:00:00 2001 From: Matt McFarland Date: Thu, 30 Jun 2022 10:03:28 -0400 Subject: [PATCH] Allow parquet assets to render as text-hrefs The href doesn't not point to a file/is not http. --- src/utils/stac.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/stac.js b/src/utils/stac.js index 69aa5d94..9fc1b8b4 100644 --- a/src/utils/stac.js +++ b/src/utils/stac.js @@ -592,9 +592,10 @@ export const renderItemColumn = (item, _, column) => { // Add tooltips to potentially long cells switch (column.key) { case "asset": - // Assets are generally rendered as a link to download a file. However, Zarr types - // are really a root directory, and the href is more important than a link - return fieldContent.contentType === "application/vnd+zarr" ? ( + // Assets are generally rendered as a link to download a file. However, some types + // are really a root directory, and the href text is more important than a link + const nonLinkHrefTypes = ["application/vnd+zarr", "application/x-parquet"]; + return nonLinkHrefTypes.includes(fieldContent.contentType) ? ( {fieldContent.href} ) : ( {fieldContent.name}