diff --git a/src/components/widgets/Greeting.jsx b/src/components/widgets/Greeting.jsx index 21729bf9..29215912 100644 --- a/src/components/widgets/Greeting.jsx +++ b/src/components/widgets/Greeting.jsx @@ -15,9 +15,9 @@ export default class Greeting extends React.PureComponent { const m = time.getMonth(); const d = time.getDate(); - if (m === 11 && d === 25) message = 'Merry Christmas'; // If it's December 25th, set the greeting string to "Merry Christmas" - else if (m === 0 && d === 1) message = 'Happy new year'; // If the date is January 1st, set the greeting string to "Happy new year" - else if (m === 9 && d === 31) message = 'Happy Halloween'; // If it's October 31st, set the greeting string to "Happy Halloween" + if (m === 11 && d === 25) message = this.props.language.christmas; // If it's December 25th, set the greeting string to "Merry Christmas" + else if (m === 0 && d === 1) message = this.props.language.newyear; // If the date is January 1st, set the greeting string to "Happy new year" + else if (m === 9 && d === 31) message = this.props.language.halloween; // If it's October 31st, set the greeting string to "Happy Halloween" return message; } diff --git a/src/components/widgets/Quote.jsx b/src/components/widgets/Quote.jsx index f8438508..71db3998 100644 --- a/src/components/widgets/Quote.jsx +++ b/src/components/widgets/Quote.jsx @@ -76,9 +76,11 @@ export default class Quote extends React.PureComponent { } render() { - const copy = (localStorage.getItem('copyButton') === 'false') ? null : this.copyQuote()}>; - const tweet = (localStorage.getItem('tweetButton') === 'false') ? null : - window.open(`https://twitter.com/intent/tweet?text=${this.state.quote} - ${this.state.author} on @getmue`, '_blank').focus()}/>; + let copy = this.copyQuote()}>; + if (localStorage.getItem('copyButton') === 'false') copy = null; + + let tweet = window.open(`https://twitter.com/intent/tweet?text=${this.state.quote} - ${this.state.author} on @getmue`, '_blank').focus()}/> + if (localStorage.getItem('tweetButton') === 'false') tweet = null; return (