mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-29 08:21:30 +00:00
23 lines
No EOL
623 B
JavaScript
23 lines
No EOL
623 B
JavaScript
var Header = React.createClass({
|
|
getInitialState: function() {
|
|
return {
|
|
title: "LBRY"
|
|
};
|
|
},
|
|
componentWillMount: function() {
|
|
new MutationObserver(function(mutations) {
|
|
this.setState({ title: mutations[0].target.innerHTML });
|
|
}.bind(this)).observe(
|
|
document.querySelector('title'),
|
|
{ subtree: true, characterData: true, childList: true }
|
|
);
|
|
},
|
|
render: function() {
|
|
return (
|
|
<header id="header">
|
|
<Link onClick={this.props.onOpenDrawer} icon="icon-bars" className="open-drawer-link" />
|
|
<h1>{ this.state.title }</h1>
|
|
</header>
|
|
);
|
|
}
|
|
}); |