17782: Fixes almost all tests (4 left) mostly by fixing namespace-type imports.
[arvados-workbench2.git] / src / views-components / context-menu / actions / file-viewer-action.tsx
index a631424e67bde5f46dbca5e370c3e6bdaa70eb29..bc3d0bd60af22380149c75e8a1b422cfb8fa50d7 100644 (file)
@@ -2,23 +2,15 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from "react";
-import { connect } from 'react-redux';
+import React from "react";
 import { ListItemIcon, ListItemText, ListItem } from "@material-ui/core";
-import { OpenIcon } from "~/components/icon/icon";
-import { sanitizeToken } from "./helpers";
-import { RootState } from "~/store/store";
+import { OpenIcon } from "components/icon/icon";
 
 export const FileViewerAction = (props: any) => {
-    const {
-        keepWebServiceUrl,
-        keepWebInlineServiceUrl,
-    } = props;
-
     return props.href
         ? <a
             style={{ textDecoration: 'none' }}
-            href={sanitizeToken(props.href.replace(keepWebServiceUrl, keepWebInlineServiceUrl), true)}
+            href={props.href}
             target="_blank"
             onClick={props.onClick}>
             <ListItem button>
@@ -32,11 +24,3 @@ export const FileViewerAction = (props: any) => {
         </a>
         : null;
 };
-
-const mapStateToProps = ({ auth }: RootState): any => ({
-    keepWebServiceUrl: auth.config.keepWebServiceUrl,
-    keepWebInlineServiceUrl: auth.config.keepWebInlineServiceUrl,
-});
-
-
-export default connect(mapStateToProps, null)(FileViewerAction);