-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-sandbox-quote-js-f7b03684f3a95c67829a.js
2 lines (2 loc) · 2.08 KB
/
component---src-pages-sandbox-quote-js-f7b03684f3a95c67829a.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{"+pmV":function(e,t,a){e.exports={post:"post-module--post--28Mq2",postShort:"post-module--postShort--2fce0",title:"post-module--title--3XBo2",coverImage:"post-module--coverImage--1GM7V",meta:"post-module--meta--3YtjE",tags:"post-module--tags--3RbqF",tag:"post-module--tag--16U9p",readMore:"post-module--readMore--3zWML",postContent:"post-module--postContent--1bfnt"}},"f9t+":function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return d}));var n=a("dI71"),o=a("q1tI"),r=a.n(o),l=a("vrFN"),u=a("Bl7J"),s=a("+pmV"),m=a.n(s),c=function(e){var t,a;return e[(t=0,a=e.length-1,Math.floor(Math.random()*(a-t+1))+t)].node},d=function(e){function t(t){var a;return(a=e.call(this,t)||this).state={randomQuote:c(t.data.allGoodreadsQuotesExport20190817Csv.edges)},a}Object(n.a)(t,e);var a=t.prototype;return a.changeQuote=function(){this.setState((function(e,t){return{randomQuote:c(t.data.allGoodreadsQuotesExport20190817Csv.edges)}}))},a.render=function(){var e=this;return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null),r.a.createElement(u.a,null,r.a.createElement("h1",null,"A Random Quote"),r.a.createElement("br",null),r.a.createElement("p",null,r.a.createElement("i",null,r.a.createElement("span",{dangerouslySetInnerHTML:{__html:this.state.randomQuote.Quote}}))),r.a.createElement("p",null,r.a.createElement("span",null,"― ",r.a.createElement("b",null,this.state.randomQuote.Author)),r.a.createElement("span",{hidden:!this.state.randomQuote.Book}," (",this.state.randomQuote.Book,")")),r.a.createElement("br",null),r.a.createElement("hr",null),r.a.createElement("p",null,"The quote is taken from my Goodreads account's saved quotes.",r.a.createElement("br",null),"Refresh the page or click this ",r.a.createElement("button",{type:"button",onClick:function(){return e.changeQuote()}},"button")," to get a new one!"),r.a.createElement("br",null),r.a.createElement("a",{href:"/sandbox",className:m.a.readMore},"← Back to sandbox")))},t}(r.a.Component)}}]);
//# sourceMappingURL=component---src-pages-sandbox-quote-js-f7b03684f3a95c67829a.js.map