{"size": 5785, "ext": "js", "max_stars_repo_path": "docs/component---src-pages-books-tsx-3a1c53fa2c429029689a.js", "max_stars_repo_name": "stanbar/stasbar-app", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "docs/component---src-pages-books-tsx-3a1c53fa2c429029689a.js", "max_issues_repo_name": "stanbar/stasbar-app", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "docs/component---src-pages-books-tsx-3a1c53fa2c429029689a.js", "max_forks_repo_name": "stanbar/stasbar-app", "max_forks_repo_forks_event_min_datetime": "2020-02-11T08:33:38.000Z", "max_forks_repo_forks_event_max_datetime": "2020-02-11T08:33:38.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 2892.5, "max_line_length": 5704, "alphanum_fraction": 0.7059636992}
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{ZcoD:function(t,e,i){"use strict";i.r(e);i("VRzm"),i("Btvt");var a=i("o0o1"),n=i.n(a),o=(i("ls82"),i("SRfc"),i("ZBNC")),r=i("tRbT"),l=i("ofer"),s=i("kKik"),c=i("ldJd"),m=i("H2TA"),u=i("q1tI"),p=i.n(u),f=i("axFy");u.Component;function d(t,e,i,a,n,o,r){try{var l=t[o](r),s=l.value}catch(c){return void i(c)}l.done?e(s):Promise.resolve(s).then(a,n)}class h extends u.Component{constructor(...t){super(...t),this.state={books:new Array,loading:!0}}componentDidMount(){this.fetchBooks()}render(){const t=this.props.classes,e=this.state,i=e.books,a=e.loading;return p.a.createElement("div",{className:t.root},p.a.createElement(r.a,{container:!0,spacing:16},a&&p.a.createElement(r.a,{item:!0,sm:12},p.a.createElement(l.a,{variant:"h5"},"Loading...")),i.map(e=>p.a.createElement(r.a,{key:e.hash,item:!0,xs:4,sm:3,md:3,lg:2,style:{height:"auto",width:"100%"}},p.a.createElement(s.a,null,p.a.createElement("img",{src:e.imageUrl,alt:e.title,className:t.img}),p.a.createElement(c.a,{title:e.title,subtitle:p.a.createElement("span",null,"by: ",e.author)}))))))}fetchBooks(){var t,e=this;return(t=n.a.mark((function t(){var i;return n.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,f.a.fetchAllBooks();case 3:i=t.sent,e.setState({books:i,loading:!1}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),console.error(t.t0),e.setState({loading:!1});case 11:case"end":return t.stop()}}),t,null,[[0,7]])})),function(){var e=this,i=arguments;return new Promise((function(a,n){var o=t.apply(e,i);function r(t){d(o,a,n,r,l,"next",t)}function l(t){d(o,a,n,r,l,"throw",t)}r(void 0)}))})()}}e.default=Object(m.a)(t=>Object(o.a)({root:{minHeight:"100vh",width:"auto",marginLeft:t.spacing(3),marginRight:t.spacing(3),[t.breakpoints.up(1100+t.spacing(6))]:{width:1100,marginLeft:"auto",marginRight:"auto"},display:"flex",flexWrap:"wrap",flexGrow:1,flexDirection:"column",justifyContent:"space-around",overflow:"hidden",padding:t.spacing(8)+"px 0"},img:{width:"100%",height:"auto"}}))(h)},kKik:function(t,e,i){"use strict";i("KKXr");var a=i("wx14"),n=i("Ff2n"),o=i("KQm4"),r=i("q1tI"),l=i("iuhU");var s=i("H2TA");var c=function(t,e){var i,a,n,r;t&&t.complete&&(t.width/t.height>t.parentElement.offsetWidth/t.parentElement.offsetHeight?((i=t.classList).remove.apply(i,Object(o.a)(e.imgFullWidth.split(" "))),(a=t.classList).add.apply(a,Object(o.a)(e.imgFullHeight.split(" ")))):((n=t.classList).remove.apply(n,Object(o.a)(e.imgFullHeight.split(" "))),(r=t.classList).add.apply(r,Object(o.a)(e.imgFullWidth.split(" ")))))};var m=r.forwardRef((function(t,e){var i=t.children,o=t.classes,s=t.className,m=(t.cols,t.component),u=void 0===m?"li":m,p=(t.rows,Object(n.a)(t,["children","classes","className","cols","component","rows"])),f=r.useRef(null);return r.useEffect((function(){!function(t,e){t&&(t.complete?c(t,e):t.addEventListener("load",(function(){c(t,e)})))}(f.current,o)})),r.useEffect((function(){var t=function(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function a(){for(var a=arguments.length,n=new Array(a),o=0;o<a;o++)n[o]=arguments[o];var r=this,l=function(){t.apply(r,n)};clearTimeout(e),e=setTimeout(l,i)}return a.clear=function(){clearTimeout(e)},a}((function(){c(f.current,o)}));return window.addEventListener("resize",t),function(){t.clear(),window.removeEventListener("resize",t)}}),[o]),r.createElement(u,Object(a.a)({className:Object(l.a)(o.root,s),ref:e},p),r.createElement("div",{className:o.tile},r.Children.map(i,(function(t){return r.isValidElement(t)?"img"===t.type||(e=t,i=["Image"],r.isValidElement(e)&&-1!==i.indexOf(e.type.muiName))?r.cloneElement(t,{ref:f}):t:null;var e,i}))))}));e.a=Object(s.a)({root:{boxSizing:"border-box",flexShrink:0},tile:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",top:"50%"}},{name:"MuiGridListTile"})(m)},ldJd:function(t,e,i){"use strict";var a=i("wx14"),n=i("Ff2n"),o=i("q1tI"),r=i("iuhU"),l=i("H2TA"),s=o.forwardRef((function(t,e){var i=t.actionIcon,l=t.actionPosition,s=void 0===l?"right":l,c=t.classes,m=t.className,u=t.subtitle,p=t.title,f=t.titlePosition,d=void 0===f?"bottom":f,h=Object(n.a)(t,["actionIcon","actionPosition","classes","className","subtitle","title","titlePosition"]),g=i&&s;return o.createElement("div",Object(a.a)({className:Object(r.a)(c.root,m,"top"===d?c.titlePositionTop:c.titlePositionBottom,u&&c.rootSubtitle),ref:e},h),o.createElement("div",{className:Object(r.a)(c.titleWrap,{left:c.titleWrapActionPosLeft,right:c.titleWrapActionPosRight}[g])},o.createElement("div",{className:c.title},p),u?o.createElement("div",{className:c.subtitle},u):null),i?o.createElement("div",{className:Object(r.a)(c.actionIcon,"left"===g&&c.actionIconActionPosLeft)},i):null)}));e.a=Object(l.a)((function(t){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:t.typography.fontFamily},titlePositionBottom:{bottom:0},titlePositionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:t.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:t.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:t.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}}),{name:"MuiGridListTileBar"})(s)}}]);
//# sourceMappingURL=component---src-pages-books-tsx-3a1c53fa2c429029689a.js.map