{"version":3,"sources":["actions/quoteFetchActionCreator.js","reducers/rootReducer.js","reducers/colorCounterReducer.js","actions/colorCounterAction.js","reducers/asyncQuoteReducer.js","store.js","NewQuote.js","TweetQuote.js","TextAuthor.js","QuoteBox.js","App.js","serviceWorker.js","index.js"],"names":["quoteFetchActionCreator","dispatch","type","fetch","then","response","json","quotes","newQuote","Math","floor","random","length","combineReducers","colorCount","state","action","count","fetching","quote","store","createStore","rootReducer","applyMiddleware","thunk","NewQuote","props","handleClick","bind","this","colorCounterAction","quoteFetch","newQuoteClass","onClick","className","id","React","Component","connect","TweetQuote","colors","tweetQuoteClass","href","encodeURIComponent","author","target","rel","icon","faTwitter","TextAuthor","textClass","authorClass","QuoteBox","quoteBoxClass","App","appHeaderClass","Boolean","window","location","hostname","match","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","registration","unregister","catch","error","console","message"],"mappings":"uWAgBaA,EAA0B,WACrC,OAAO,SAAUC,GACfA,EAPK,CACLC,KAX4B,qBAkB5BC,MACE,0IAECC,MAAK,SAAAC,GAAQ,OAAIA,EAASC,UAC1BF,MAAK,SAAAG,GACJN,EApBC,CACLC,KAL0B,iBAM1BM,SAoBQD,EAAOA,OAAOE,KAAKC,MAAMD,KAAKE,SAAWJ,EAAOA,OAAOK,gBCtBpDC,cAAgB,CAC7BC,WCHa,WAAwB,IAAvBC,EAAsB,uDAAd,EAAGC,EAAW,uCACpC,OAAQA,EAAOd,MACb,ICJyB,gBDKvB,OAAOc,EAAOC,MAChB,QACE,OAAOF,IDDXP,SGHa,WAAqD,IAApDO,EAAmD,uDAA3C,CAAEG,UAAU,EAAOC,MAAO,IAAMH,EAAW,uCACjE,OAAQA,EAAOd,MACb,IJJ4B,mBIK1B,MAAO,CAAEgB,UAAU,EAAMC,MAAO,IAClC,IJP0B,iBIQxB,MAAO,CAAED,UAAU,EAAOC,MAAOH,EAAOR,UAC1C,QACE,OAAOO,MCJEK,EAFDC,YAAYC,EAAaC,YAAgBC,M,iECWjDC,G,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OAEF2C,SAASC,eAAe,SDsHpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrB/D,MAAK,SAACgE,GACLA,EAAaC,gBAEdC,OAAM,SAACC,GACNC,QAAQD,MAAMA,EAAME,c","file":"static/js/main.13413d36.chunk.js","sourcesContent":["export const RECEIVED_QUOTE = \"RECEIVED_QUOTE\";\nexport const REQUESTING_QUOTE = \"REQUESTING_QUOTE\";\n\nexport const receivedQuoteAction = quote => {\n return {\n type: RECEIVED_QUOTE,\n newQuote: quote\n };\n};\n\nexport const requestingQuoteAction = () => {\n return {\n type: REQUESTING_QUOTE\n };\n};\n\nexport const quoteFetchActionCreator = () => {\n return function (dispatch) {\n dispatch(requestingQuoteAction());\n fetch(\n \"https://gist.githubusercontent.com/camperbot/5a022b72e96c4c9585c32bf6a75f62d9/raw/e3c6895ce42069f0ee7e991229064f167fe8ccdc/quotes.json\"\n )\n .then(response => response.json())\n .then(quotes => {\n dispatch(\n receivedQuoteAction(\n quotes.quotes[Math.floor(Math.random() * quotes.quotes.length)]\n )\n );\n });\n };\n};\n","import { combineReducers } from \"redux\";\nimport colorCounterReducer from \"./colorCounterReducer\";\nimport asyncQuoteReducer from \"./asyncQuoteReducer\";\n\nexport default combineReducers({\n colorCount: colorCounterReducer,\n newQuote: asyncQuoteReducer,\n});\n","import { INCCOLORCOUNT } from \"../actions/colorCounterAction\";\n\nexport default (state = 1, action) => {\n switch (action.type) {\n case INCCOLORCOUNT:\n return action.count;\n default:\n return state;\n }\n};\n","export const INCCOLORCOUNT = \"INCCOLORCOUNT\";\n\nexport const colorCounterAction = (count) => {\n return {\n type: INCCOLORCOUNT,\n count: count,\n };\n};\n","import { REQUESTING_QUOTE } from \"../actions/quoteFetchActionCreator\";\nimport { RECEIVED_QUOTE } from \"../actions/quoteFetchActionCreator\";\n\nexport default (state = { fetching: false, quote: \"\" }, action) => {\n switch (action.type) {\n case REQUESTING_QUOTE:\n return { fetching: true, quote: \"\" };\n case RECEIVED_QUOTE:\n return { fetching: false, quote: action.newQuote };\n default:\n return state;\n }\n};\n","import { createStore, applyMiddleware } from \"redux\";\nimport thunk from \"redux-thunk\";\nimport rootReducer from \"./reducers/rootReducer\";\n\nconst store = createStore(rootReducer, applyMiddleware(thunk));\n\nexport default store;\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport \"./NewQuote.css\";\n\nimport { colorCounterAction } from \"./actions/colorCounterAction\";\nimport { quoteFetchActionCreator } from \"./actions/quoteFetchActionCreator\";\n\nconst mapStateToProps = (state) => ({ ...state });\n\nconst mapDispatchToProps = (dispatch) => ({\n colorCounterAction: (count) => dispatch(colorCounterAction(count)),\n quoteFetch: () => dispatch(quoteFetchActionCreator()),\n});\n\nclass NewQuote extends React.Component {\n constructor(props) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick() {\n this.props.colorCounterAction(\n this.props.colorCount > 1 ? 0 : this.props.colorCount + 1\n );\n this.props.quoteFetch();\n }\n\n render() {\n const colors = [\"red-background\", \"blue-background\", \"yellow-background\"];\n const newQuoteClass = \"NewQuote \" + colors[this.props.colorCount];\n return (\n \n );\n }\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(NewQuote);\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faTwitter } from \"@fortawesome/free-brands-svg-icons\";\n\nimport \"./TweetQuote.css\";\n\nconst mapStateToProps = state => ({ ...state });\n\nclass TweetQuote extends React.Component {\n render() {\n const colors = [\"red-background\", \"blue-background\", \"yellow-background\"];\n const tweetQuoteClass = \"TweetQuote \" + colors[this.props.colorCount];\n let href = \"https://twitter.com/intent/tweet?text=\";\n if (typeof this.props.newQuote.quote === \"object\") {\n href += encodeURIComponent(\n this.props.newQuote.quote.quote +\n \"\\n--\" +\n this.props.newQuote.quote.author\n );\n }\n return (\n
\n {quote}\n
\n \n