Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Update og:title when shot title changes. (#4188)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba committed Mar 28, 2018
1 parent 0e99dfd commit 1919853
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions server/src/pages/shot/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,13 @@ class Head extends React.Component {
if (!this.props.shot) {
return null;
}
const title = (this.props.shot.openGraph && this.props.shot.openGraph.title) ||
(this.props.shot.twitterCard && this.props.shot.twitterCard.title) ||
this.props.shot.title;
const og = [
<meta property="og:type" content="website" key="ogtype" />,
<meta property="og:title" content={title} key="ogtitle" />
<meta property="og:title" content={this.props.shot.title} key="ogtitle" />
];
const twitter = [
<meta name="twitter:card" content="summary_large_image" key="twittercard" />,
<meta name="twitter:title" content={title} key="twitterTitle" />
<meta name="twitter:title" content={this.props.shot.title} key="twitterTitle" />
];

for (const clipId of this.props.shot.clipNames()) {
Expand Down

0 comments on commit 1919853

Please sign in to comment.