refs #14525 fix breadcamps and workflow share icon
[arvados-workbench2.git] / src / views-components / data-explorer / renderers.tsx
index 6e25508d701c212e95343cfefceb31db70a402e5..c8c6428043f7ecf04d758aec8147457ac91a490e 100644 (file)
@@ -86,13 +86,20 @@ const getPublicUuid = (uuidPrefix: string) => {
     return `${uuidPrefix}-tpzed-anonymouspublic`;
 };
 
-// do share onClick
+// ToDo: share onClick
 export const resourceShare = (uuidPrefix: string, ownerUuid?: string) => {
-    return <Tooltip title="Share">
-        <IconButton onClick={() => undefined}>
-            {ownerUuid === getPublicUuid(uuidPrefix) ? <ShareIcon /> : null}
-        </IconButton>
-    </Tooltip>;
+    const isPublic = ownerUuid === getPublicUuid(uuidPrefix);
+    return (
+        <div>
+            { isPublic &&
+                <Tooltip title="Share">
+                    <IconButton onClick={() => undefined}>
+                        <ShareIcon />
+                    </IconButton>
+                </Tooltip>
+            }
+        </div>
+    );
 };
 
 export const ResourceShare = connect(