From 127045bbf637119dd8fec953c5ee2a30b07849fb Mon Sep 17 00:00:00 2001 From: David Ralph Date: Tue, 31 Mar 2020 11:38:33 +0100 Subject: [PATCH] revert --- src/components/Quote.jsx | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/src/components/Quote.jsx b/src/components/Quote.jsx index 43587364..68412ba8 100644 --- a/src/components/Quote.jsx +++ b/src/components/Quote.jsx @@ -12,27 +12,13 @@ export default class Quote extends React.Component { } async getQuote() { - // Taken from Greeting.jsx - const t = new Date(); // Current date object - const m = t.getMonth(); // Current month - const d = t.getDate(); // Current Date - try { // First we try and get a quote from the API... - if (m === 3 && d === 1) { // April fools! - let data = await fetch('https://api.kanye.rest'); - data = await data.json(); - this.setState({ - quote: data.quote, - author: 'Kanye West' - }); - } else { - let data = await fetch('https://api.muetab.xyz/getQuote'); - data = await data.json(); - this.setState({ - quote: data.quote, - author: data.author - }); - } + let data = await fetch('https://api.muetab.xyz/getQuote'); + data = await data.json(); + this.setState({ + quote: data.quote, + author: data.author + }); } catch (e) { // ..and if that fails we load one locally const quote = Quotes.random(); // Get a random quote from our local package this.setState({