akkoma/priv/static/packs/features/following.js

2 lines
No EOL
2 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{691:function(a,t,o){"use strict";o.r(t),o.d(t,"default",function(){return L});var c,e,s,n=o(1),r=o(7),p=o(0),i=o(2),d=o(54),u=o.n(d),l=(o(3),o(20)),h=o(24),b=o(5),f=o.n(b),j=o(26),O=o.n(j),m=o(291),I=o(27),w=o(6),y=o(896),M=o(642),g=o(911),v=o(644),A=o(643),L=Object(l.connect)(function(a,t){return{accountIds:a.getIn(["user_lists","following",t.params.accountId,"items"]),hasMore:!!a.getIn(["user_lists","following",t.params.accountId,"next"])}})((s=e=function(e){function a(){for(var a,t=arguments.length,o=new Array(t),c=0;c<t;c++)o[c]=arguments[c];return a=e.call.apply(e,[this].concat(o))||this,Object(i.a)(Object(p.a)(Object(p.a)(a)),"handleLoadMore",u()(function(){a.props.dispatch(Object(I.z)(a.props.params.accountId))},300,{leading:!0})),a}Object(r.a)(a,e);var t=a.prototype;return t.componentWillMount=function(){this.props.dispatch(Object(I.A)(this.props.params.accountId)),this.props.dispatch(Object(I.D)(this.props.params.accountId))},t.componentWillReceiveProps=function(a){a.params.accountId!==this.props.params.accountId&&a.params.accountId&&(this.props.dispatch(Object(I.A)(a.params.accountId)),this.props.dispatch(Object(I.D)(a.params.accountId)))},t.render=function(){var a=this.props,t=a.shouldUpdateScroll,o=a.accountIds,c=a.hasMore;if(!o)return Object(n.a)(M.a,{},void 0,Object(n.a)(m.a,{}));var e=Object(n.a)(w.b,{id:"account.follows.empty",defaultMessage:"This user doesn't follow anyone yet."});return Object(n.a)(M.a,{},void 0,Object(n.a)(v.a,{}),Object(n.a)(A.a,{scrollKey:"following",hasMore:c,onLoadMore:this.handleLoadMore,shouldUpdateScroll:t,prepend:Object(n.a)(g.a,{accountId:this.props.params.accountId,hideTabs:!0}),alwaysPrepend:!0,emptyMessage:e},void 0,o.map(function(a){return Object(n.a)(y.a,{id:a,withNote:!1},a)})))},a}(h.a),Object(i.a)(e,"propTypes",{params:f.a.object.isRequired,dispatch:f.a.func.isRequired,shouldUpdateScroll:f.a.func,accountIds:O.a.list,hasMore:f.a.bool}),c=s))||c}}]);
//# sourceMappingURL=following.js.map