style: cleanup some things

This commit is contained in:
David Ralph
2021-05-26 22:28:26 +01:00
parent 1d6013f738
commit 586b6f8700
20 changed files with 26 additions and 44 deletions

View File

@@ -243,14 +243,13 @@ export default class Background extends React.PureComponent {
const photoPack = JSON.parse(localStorage.getItem('photo_packs'));
if (photoPack) {
const randomPhoto = photoPack[Math.floor(Math.random() * photoPack.length)];
const photoLocation = randomPhoto.location.replace(/[null]+/g, '');
return this.setState({
url: randomPhoto.url.default,
type: 'photo_pack',
photoInfo: {
hidden: false,
credit: randomPhoto.photographer,
location: photoLocation !== ' ' && photoLocation !== '???' ? randomPhoto.location : 'N/A',
location: randomPhoto.location || 'N/A'
}
});
}

View File

@@ -1,5 +1,3 @@
import React from 'react';
import Info from '@material-ui/icons/Info';
import Location from '@material-ui/icons/LocationOn';
import Camera from '@material-ui/icons/PhotoCamera';