@mornya/react-social-libs
Version:
The project of React.js Social Share and Widget modules.
1 lines • 1.57 kB
JavaScript
var e,o,t=this&&this.__extends||(e=function(o,t){return(e=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(o,t){o.__proto__=t}:function(o,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(o[e]=t[e])}))(o,t)},function(o,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=o}e(o,t),o.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},r=(Object.defineProperty(exports,"__esModule",{value:!0}),n(require("react"))),n=require("../utils/BaseWidgetComponent"),a=require("../utils/Loader"),n=(o=n.BaseWidgetComponent,t(KakaoStoryFollow,o),KakaoStoryFollow.prototype.onInit=function(){this.initialize("KakaoStory-Follow",{appId:"",subscribeChannelId:"",showFollowerCount:!0})},KakaoStoryFollow.prototype.onRender=function(o){return r.default.createElement("div",{id:this.id,"data-id":o.subscribeChannelId,"data-type":"horizontal","data-show-follower-count":o.showFollowerCount?"true":"false"})},KakaoStoryFollow.prototype.onMount=function(t){var e=this;(0,a.initKakaoSDK)(t.appId).then(function(){var o;return window.Kakao.Story.createFollowButton({container:"#".concat(e.id),id:null!=(o=t.subscribeChannelId)?o:""}),e.setApiStep(),!0}).catch(console.error)},KakaoStoryFollow.prototype.onUnmount=function(o){(0,a.destroyKakaoSDK)()},KakaoStoryFollow);function KakaoStoryFollow(){return null!==o&&o.apply(this,arguments)||this}exports.default=n;