+
+
+ Clicking on the following links will take you to an external site which will then make requests to nextstrain.org for the data you are currently viewing
+
+
+ {window.location.hostname==='localhost' && (
+
+ NOTE: The site is currently running on localhost and thus the following links will not work
+
+ )}
+
+
+
+ {data({distanceMeasure, colorBy}).map((d) => (
+
+ {d.name}
+ {d.description()}
+
+ ))}
+
+
+ These are only gonna work with nextstrain.org (and dev, review apps etc) because it uses the RESTful API
+
+
+ >
+ );
+}
+
+
+export const canShowLinkOuts = () => {
+ // TODO XXX - additionally query an extension flag
+ if (window.location.hostname==='localhost' && !forceNextstrainHost) {
+ console.log("Link-out modal disabled while running on localhost")
+ return false;
+ }
+ return true;
+}
\ No newline at end of file
diff --git a/src/components/modal/Modal.jsx b/src/components/modal/Modal.jsx
index 312193891..025c5500e 100644
--- a/src/components/modal/Modal.jsx
+++ b/src/components/modal/Modal.jsx
@@ -6,6 +6,7 @@ import { SET_MODAL } from "../../actions/types";
import { infoPanelStyles } from "../../globalStyles";
import { stopProp } from "../tree/infoPanels/click";
import DownloadModalContents from "../download/downloadModal";
+import { LinkOutModalContents } from "./LinkOutModalContents.jsx";
@connect((state) => ({
browserDimensions: state.browserDimensions.browserDimensions,
@@ -85,6 +86,9 @@ class Modal extends React.Component {
case 'download':
Contents = DownloadModalContents;
break;
+ case 'linkOut':
+ Contents = LinkOutModalContents;
+ break;
default:
return null;
}