diff --git a/src/components/framework/fine-print.js b/src/components/framework/fine-print.js index 35430d553..9ed0277a2 100644 --- a/src/components/framework/fine-print.js +++ b/src/components/framework/fine-print.js @@ -70,13 +70,6 @@ class FinePrint extends React.Component { return false; } - getUpdated() { - const { t } = this.props; - if (this.props.metadata.updated) { - return ({t("Data updated")} {this.props.metadata.updated}); - } - return null; - } downloadDataButton() { const { t } = this.props; return ( @@ -97,8 +90,6 @@ class FinePrint extends React.Component {
- {this.getUpdated()} - {dot} {this.downloadDataButton()} {dot} {"Auspice v" + version} diff --git a/src/components/info/byline.js b/src/components/info/byline.js index 6dd008260..83f136611 100644 --- a/src/components/info/byline.js +++ b/src/components/info/byline.js @@ -22,6 +22,7 @@ class Byline extends React.Component { {renderAvatar(t, this.props.metadata)} {renderBuildInfo(t, this.props.metadata)} {renderMaintainers(t, this.props.metadata)} + {renderDataUpdated(t, this.props.metadata)} {renderDataProvenance(t, this.props.metadata)} ); @@ -101,6 +102,20 @@ function renderMaintainers(t, metadata) { return null; } +/** + * Returns a React component detailing the date the data was last updated. + * Renders a containing "Data updated X", where X derives from `metadata.updated` + */ +function renderDataUpdated(t, metadata) { + if (metadata.updated) { + return ( + + {`${t("Data updated")} ${metadata.updated}. `} + + ); + } + return null; +} /** * Returns a React component detailing the data provenance of the build (pipeline).