X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/71b9264c1720e619f8cfcb297a7848ece420c61c..7f160d39308e02e571543b2958320f387b5372ab:/src/views-components/details-panel/file-details.tsx?ds=sidebyside

diff --git a/src/views-components/details-panel/file-details.tsx b/src/views-components/details-panel/file-details.tsx
index db7c9cfe..7b128c2c 100644
--- a/src/views-components/details-panel/file-details.tsx
+++ b/src/views-components/details-panel/file-details.tsx
@@ -2,13 +2,13 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { DetailsData } from "./details-data";
-import { CollectionFile, CollectionDirectory, CollectionFileType } from '~/models/collection-file';
-import { getIcon } from '~/components/file-tree/file-tree-item';
-import { DetailsAttribute } from '~/components/details-attribute/details-attribute';
-import { formatFileSize } from '~/common/formatters';
-import { FileThumbnail } from '~/components/file-tree/file-thumbnail';
+import { CollectionFile, CollectionDirectory, CollectionFileType } from 'models/collection-file';
+import { getIcon } from 'components/file-tree/file-tree-item';
+import { DetailsAttribute } from 'components/details-attribute/details-attribute';
+import { formatFileSize } from 'common/formatters';
+import { FileThumbnail } from 'components/file-tree/file-thumbnail';
 import isImage from 'is-image';
 
 export class FileDetails extends DetailsData<CollectionFile | CollectionDirectory> {
@@ -18,13 +18,13 @@ export class FileDetails extends DetailsData<CollectionFile | CollectionDirector
         return <Icon className={className} />;
     }
 
-    getDetails() {
+    getDetails({showPreview}) {
         const { item } = this;
         return item.type === CollectionFileType.FILE
             ? <>
                 <DetailsAttribute label='Size' value={formatFileSize(item.size)} />
                 {
-                    isImage(item.url) && <>
+                    isImage(item.url) && showPreview && <>
                         <DetailsAttribute label='Preview' />
                         <FileThumbnail file={item} />
                     </>
