diff --git a/src/components/info/byline.js b/src/components/info/byline.js index 7a322e433..b47e5bc89 100644 --- a/src/components/info/byline.js +++ b/src/components/info/byline.js @@ -25,6 +25,29 @@ const styles = { }; const Byline = ({width, metadata}) => { + + /** Render a special byline for nexstrain's nCoV (SARS-CoV-2) builds. + * This is somewhat temporary and may be switched to a nextstrain.org + * auspice customisation in the future. + */ + if ( + window.location.hostname === "nextstrain.org" && // comment out this line for testing on localhost + window.location.pathname.startsWith("/ncov") + ) { + return ( +
+ {renderAvatar(metadata)} + {renderMaintainers(metadata)} + + {" Enabled by data from "} + gisaid-logo + +
+ ) + } + /* End nextstrain-specific ncov / SARS-CoV-2 code */ + + return (
{renderAvatar(metadata)} @@ -61,7 +84,6 @@ function renderBuildInfo(metadata) { {repo.replace(/^(http[s]?:\/\/)/, "").replace(/^www\./, "").replace(/^github.com\//, "")} - {". "} ); @@ -71,27 +93,6 @@ function renderBuildInfo(metadata) { return null; } -/** Additional byline content to be added when certain criteria met. - * This was introduced during the 2019 nCoV outbreak. In the future this - * design should be switched a JSON key or a nextstrain.org auspice customisation - */ -function PotentialGisaidExtraByline() { - if ( - window.location.hostname === "nextstrain.org" && // use "localhost" for testing - window.location.pathname.startsWith("/ncov") - ) { - return ( - - {" using data from "} - - gisaid-logo - - - ); - } - return null; -} - function renderMaintainers(metadata) { let maintainersArray; if (Object.prototype.hasOwnProperty.call(metadata, "maintainers")) {