honkoma/priv/static/packs/flavours/glitch/async/followers.js

2 lines
2.5 KiB
JavaScript
Raw Normal View History

2020-02-29 05:41:13 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{770:function(t,a,c){"use strict";c.r(a),c.d(a,"default",(function(){return T}));var o,e,n,s=c(0),r=c(2),p=c(7),i=c(1),u=c(62),l=c.n(u),d=c(3),h=c.n(d),b=c(13),m=c(5),f=c.n(m),j=c(14),O=c.n(j),I=c(299),w=c(22),M=c(6),g=c(466),v=c(730),y=c(1052),C=c(1056),H=c(18),k=c(1029),R=c(1022),T=Object(b.connect)((function(t,a){return{isAccount:!!t.getIn(["accounts",a.params.accountId]),accountIds:t.getIn(["user_lists","followers",a.params.accountId,"items"]),hasMore:!!t.getIn(["user_lists","followers",a.params.accountId,"next"])}}))((n=e=function(t){function a(){for(var a,c=arguments.length,o=new Array(c),e=0;e<c;e++)o[e]=arguments[e];return a=t.call.apply(t,[this].concat(o))||this,Object(i.a)(Object(r.a)(a),"handleHeaderClick",(function(){a.column.scrollTop()})),Object(i.a)(Object(r.a)(a),"handleScroll",(function(t){var c=t.target;c.scrollTop===c.scrollHeight-c.clientHeight&&a.props.hasMore&&a.props.dispatch(Object(w.D)(a.props.params.accountId))})),Object(i.a)(Object(r.a)(a),"handleLoadMore",l()((function(){a.props.dispatch(Object(w.D)(a.props.params.accountId))}),300,{leading:!0})),Object(i.a)(Object(r.a)(a),"setRef",(function(t){a.column=t})),a}Object(p.a)(a,t);var c=a.prototype;return c.componentWillMount=function(){this.props.accountIds||(this.props.dispatch(Object(w.F)(this.props.params.accountId)),this.props.dispatch(Object(w.H)(this.props.params.accountId)))},c.componentWillReceiveProps=function(t){t.params.accountId!==this.props.params.accountId&&t.params.accountId&&(this.props.dispatch(Object(w.F)(t.params.accountId)),this.props.dispatch(Object(w.H)(t.params.accountId)))},c.render=function(){var t=this.props,a=t.accountIds,c=t.hasMore,o=t.isAccount,e=t.multiColumn;if(!o)return Object(s.a)(v.a,{},void 0,Object(s.a)(k.a,{}));if(!a)return Object(s.a)(v.a,{},void 0,Object(s.a)(I.a,{}));var n=Object(s.a)(M.b,{id:"account.followers.empty",defaultMessage:"No one follows this user yet."});return h.a.createElement(v.a,{ref:this.setRef},Object(s.a)(y.a,{onClick:this.handleHeaderClick,multiColumn:e}),Object(s.a)(R.a,{scrollKey:"followers",hasMore:c,onLoadMore:this.handleLoadMore,prepend:Object(s.a)(C.a,{accountId:this.props.params.accountId,hideTabs:!0}),alwaysPrepend:!0,emptyMessage:n,bindToDocument:!e},void 0,a.map((function(t){return Object(s.a)(g.a,{id:t,withNote:!1},t)}))))},a}(H.a),Object(i.a)(e,"propTypes",{params:f.a.object.isRequired,dispatch:f.a.func.isRequired,accountIds:O.a.list,hasMore:f.a.bool,isAccount:f.a.bool,multiColumn:f.a.bool}),o=n))||o}}]);
2018-09-16 21:17:34 +00:00
//# sourceMappingURL=followers.js.map