text: (window.webpackJsonp=window.webpackJsonp||[]).push([[9],{L9NX:function(C,d,_){"use strict";_.r(d);var b=_("/r5s"),O=_("oBjn"),h=_("6QJr"),M=_("2coe"),D=_("BZBb"),p=_("Jbsc"),m=_.n(p),P=_("T9Mk"),v=_.n(P),f=_("dAkH"),g=_("q5+0"),y=_("9kvl"),E=_("XuRK"),R=_.n(E),l=_("ikfJ"),L=_.n(l),W=function(s){Object(M.a)(n,s);var u=Object(D.a)(n);function n(){var a;Object(O.a)(this,n);for(var o=arguments.length,r=new Array(o),e=0;e<o;e++)r[e]=arguments[e];return a=u.call.apply(u,[this].concat(r)),a.state={isReady:!1},a}return Object(h.a)(n,[{key:"componentDidMount",value:function(){var a=Object(b.a)(m.a.mark(function r(){var e,i;return m.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.setState({isReady:!0}),e=this.props.dispatch,!(window.location.href.indexOf("?code=")>-1)){t.next=8;break}return i=window.location.href.split("?code=")[1],t.next=6,e({type:"user/getGithubToken",payload:{code:i}});case 6:t.next=9;break;case 8:e&&e({type:"user/fetchCurrent"});case 9:case"end":return t.stop()}},r,this)}));function o(){return a.apply(this,arguments)}return o}()},{key:"render",value:function(){var o=this.state.isReady,r=this.props,e=r.children,i=r.loading,c=r.currentUser,t=c&&c.id,j=Object(E.stringify)({redirect:window.location.href});return!t&&i||!o?Object(l.jsx)(f.a,{}):!t&&window.location.pathname!=="/user/login"?Object(l.jsx)(g.a,{to:"/user/login?".concat(j)}):e}}]),n}(v.a.Component);d.default=Object(y.b)(function(s){var u=s.user,n=s.loading;return{currentUser:u.currentUser,loading:n.models.user}})(W)}}]);
  