17305: Added handling for non collection file size display
[arvados-workbench2.git] / src / views-components / data-explorer / renderers.tsx
index ee40dd3988a2c4b028863903c5c533a045c1c147..4ec0734442644d0168a9edc18fc0860950113303 100644 (file)
@@ -417,6 +417,11 @@ export const renderFileSize = (fileSize?: number) =>
 export const ResourceFileSize = connect(
     (state: RootState, props: { uuid: string }) => {
         const resource = getResource<CollectionResource>(props.uuid)(state.resources);
+
+        if (resource && resource.kind === ResourceKind.COLLECTION) {
+            return { fileSize: '' };
+        }
+
         return { fileSize: resource ? resource.fileSizeTotal : 0 };
     })((props: { fileSize?: number }) => renderFileSize(props.fileSize));