7b772eed42b1612512041433f3c7274a5618fb4216990fb13d5a39f9736dcf27

Source Code:

(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{695:function(n,e,t){"use strict";t.r(e);var i=t(3),o=t.n(i),s=t(2),r=t.n(s),u=t(5),a=t.n(u),p=t(4),c=t.n(p),l=t(6),h=t.n(l),d=t(0),w=t.n(d),m=t(12),f=t(7),b=t.n(f),y=function(n){function e(n,t){return o()(this,e),a()(this,c()(e).call(this,n))}return h()(e,n),r()(e,[{key:"shouldComponentUpdate",value:function(n,e){return b()(this,n,e)}},{key:"componentDidMount",value:function(){var n=this;"undefined"!=typeof window&&(this.props.channel||this.props.channelId)&&(window.gapi?this.renderSubscribeButton():this.gapiTimer=window.setInterval(function(){window.gapi&&(window.clearInterval(n.gapiTimer),n.renderSubscribeButton())},500))}},{key:"componentWillUnmount",value:function(){this.gapiTimer&&window.clearInterval(this.gapiTimer)}},{key:"renderSubscribeButton",value:function(){window.gapi.ytsubscribe.render(Object(m.findDOMNode)(this),{channel:this.props.channel,channelId:this.props.channelId,count:this.props.count,layout:this.props.layout,theme:this.props.theme})}},{key:"render",value:function(){return w.a.createElement(this.props.component,{className:"youtube-subscribe-button "+(this.props.className||"")},null)}}]),e}(w.a.Component);y.defaultProps={count:"hidden",layout:"default",theme:"default",component:"span"},e.default=y}}]);