diff --git a/src/components/modals/Settings.jsx b/src/components/modals/Settings.jsx index 690fc85e..b07846cb 100644 --- a/src/components/modals/Settings.jsx +++ b/src/components/modals/Settings.jsx @@ -137,6 +137,7 @@ export default class Settings extends React.PureComponent {
+
this.resetItem(item)}/> diff --git a/src/components/widgets/Quote.jsx b/src/components/widgets/Quote.jsx index 3fc1b374..44eb2975 100644 --- a/src/components/widgets/Quote.jsx +++ b/src/components/widgets/Quote.jsx @@ -3,6 +3,7 @@ import Quotes from '@muetab/quotes'; import FileCopy from '@material-ui/icons/FilterNone'; import { toast } from 'react-toastify'; import * as Constants from '../../modules/constants'; +import TwitterIcon from '@material-ui/icons/Twitter'; export default class Quote extends React.PureComponent { constructor(...args) { @@ -77,12 +78,15 @@ export default class Quote extends React.PureComponent { render() { let copy = this.copyQuote()}>; - if (localStorage.getItem('copyButton') === 'false') copy = ''; + 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 (

{`${this.state.quote}`}

-

{this.state.author} {copy}

+

{this.state.author} {copy} {tweet}

); } diff --git a/src/modules/defaultSettings.json b/src/modules/defaultSettings.json index 88d8fcd9..e2d92efd 100644 --- a/src/modules/defaultSettings.json +++ b/src/modules/defaultSettings.json @@ -78,5 +78,9 @@ { "name": "favouriteEnabled", "value": true + }, + { + "name": "tweetButton", + "value": false } ] \ No newline at end of file