feat: locally store stats so users can see them (no ui yet)

This commit is contained in:
David Ralph
2021-06-30 11:27:54 +01:00
parent 1d44b2792e
commit 2dcaa5270d
28 changed files with 78 additions and 45 deletions

View File

@@ -150,13 +150,13 @@ export default class Quote extends React.PureComponent {
}
copyQuote = () => {
window.analytics.postEvent('feature', 'Quote copied');
window.stats.postEvent('feature', 'Quote copied');
navigator.clipboard.writeText(`${this.state.quote} - ${this.state.author}`);
toast(window.language.toasts.quote);
}
tweetQuote = () => {
window.analytics.postEvent('feature', 'Quote tweet');
window.stats.postEvent('feature', 'Quote tweet');
window.open(`https://twitter.com/intent/tweet?text=${this.state.quote} - ${this.state.author} on @getmue`, '_blank').focus();
}
@@ -173,7 +173,7 @@ export default class Quote extends React.PureComponent {
});
}
window.analytics.postEvent('feature', 'Quote favourite');
window.stats.postEvent('feature', 'Quote favourite');
}
init() {