Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into update-webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Nov 23, 2022
2 parents 785c3ba + 5ef924a commit 9290033
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/explorer/ExplorerIndividualContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,17 @@ class ExplorerIndividualContent extends Component {
? matchingMenuKeys(individualMenu, urlPath(this.props.nodeInfo.CHORD_URL))
: [];

const headerTitle = (individual) => {
if (!individual) {
return null;
}
const mainId = individual.id;
const alternateIds = individual.alternate_ids ?? [];
return alternateIds.length ? `${mainId} (${alternateIds.join(", ")})` : mainId;
};

return <>
<SitePageHeader title={(individual || {}).id || "Loading..."}
<SitePageHeader title={headerTitle(individual) || "Loading..."}
withTabBar={true}
onBack={this.state.backUrl
? (() => this.props.history.push(this.state.backUrl)) : undefined}
Expand Down

0 comments on commit 9290033

Please sign in to comment.