19153: Use server configuration
[arvados-workbench2.git] / src / views-components / context-menu / actions / file-viewer-action.tsx
index a2c32bea875e32524be04532dd90957e6da06675..5d98ab6e131bf3ad7716f4a49e5d6a30467265cf 100644 (file)
@@ -2,29 +2,26 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from "react";
+import React from "react";
 import { ListItemIcon, ListItemText, ListItem } from "@material-ui/core";
-import { OpenIcon } from "~/components/icon/icon";
-import { sanitizeToken } from "./helpers";
-
-export const FileViewerAction = (props: { href?: any, download?: any, onClick?: () => void, kind?: string, currentCollectionUuid?: string; }) => {
-    const fileProps = props.download ? { download: props.download } : {};
+import { OpenIcon } from "components/icon/icon";
 
+export const FileViewerAction = (props: any) => {
     return props.href
         ? <a
             style={{ textDecoration: 'none' }}
-            href={sanitizeToken(props.href)}
+            href={props.href}
             target="_blank"
-            onClick={props.onClick}
-            {...fileProps}>
+            rel="noopener noreferrer"
+            onClick={props.onClick}>
             <ListItem button>
-                    <ListItemIcon>
-                        <OpenIcon />
-                    </ListItemIcon>
+                <ListItemIcon>
+                    <OpenIcon />
+                </ListItemIcon>
                 <ListItemText>
                     Open in new tab
-                </ListItemText>
+                    </ListItemText>
             </ListItem>
         </a>
         : null;
-};
\ No newline at end of file
+};