fix: new radio buttons, fix background bugs etc

Co-authored-by: Alex Sparkes <turbomarshmello@gmail.com>
This commit is contained in:
David Ralph
2021-03-20 15:52:27 +00:00
parent ab7681f3d0
commit e092c805e8
14 changed files with 120 additions and 73 deletions

View File

@@ -57,6 +57,10 @@ export default class Quote extends React.PureComponent {
}
async getQuote() {
if (localStorage.getItem('offlineMode') === 'true') {
return this.doOffline();
}
const quotePackAPI = JSON.parse(localStorage.getItem('quoteAPI'));
if (quotePackAPI) {
try {
@@ -86,10 +90,6 @@ export default class Quote extends React.PureComponent {
});
}
if (localStorage.getItem('offlineMode') === 'true') {
return this.doOffline();
}
// First we try and get a quote from the API...
try {
const data = await (await fetch(window.constants.API_URL + '/getQuote?language=' + localStorage.getItem('quotelanguage'))).json();