Set window title to filePage metadata title #408
1 changed files with 4 additions and 1 deletions
|
@ -36,6 +36,9 @@ class FilePage extends React.PureComponent {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.fetchFileInfo(this.props);
|
this.fetchFileInfo(this.props);
|
||||||
this.fetchCostInfo(this.props);
|
this.fetchCostInfo(this.props);
|
||||||
|
document.title = this.props.metadata
|
||||||
|
? this.props.metadata.title
|
||||||
|
: document.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
|
@ -111,7 +114,7 @@ class FilePage extends React.PureComponent {
|
||||||
{!fileInfo || fileInfo.written_bytes <= 0
|
{!fileInfo || fileInfo.written_bytes <= 0
|
||||||
? <span style={{ float: "right" }}>
|
? <span style={{ float: "right" }}>
|
||||||
<FilePrice uri={lbryuri.normalize(uri)} />
|
<FilePrice uri={lbryuri.normalize(uri)} />
|
||||||
{isRewardContent && <span>{" "}<IconFeatured /></span> }
|
{isRewardContent && <span>{" "}<IconFeatured /></span>}
|
||||||
</span>
|
</span>
|
||||||
: null}
|
: null}
|
||||||
<h1>{title}</h1>
|
<h1>{title}</h1>
|
||||||
|
|
Loading…
Reference in a new issue