Skip to content

Commit

Permalink
Workaround for bug in Helmet nfl/react-helmet#286
Browse files Browse the repository at this point in the history
  • Loading branch information
shuttle1987 authored and aapeliv committed Nov 5, 2019
1 parent b396664 commit 8ce5e86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/templates/person.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import Helmet from 'react-helmet'

export default class PersonalAboutTemplate extends React.Component {
render(){
console.log("PersonalAboutTemplate props", this.props)
//Note that if 2 people have the exact same name this will fail
const currentPerson = this.props.data.allPeopleJson.edges[0].node;
console.log("current person", currentPerson);

const title_text = `About ${currentPerson.name}`;
return (
<div>
<Helmet>
<title>About {currentPerson.name}</title>
<title>{title_text}</title>
</Helmet>
<h1>
About {currentPerson.name}
Expand Down

0 comments on commit 8ce5e86

Please sign in to comment.