fix: many bug fixes and some performance improvements

Co-authored-by: Alex Sparkes <turbomarshmello@gmail.com>
This commit is contained in:
David Ralph
2021-04-11 15:53:11 +01:00
parent 465596d22d
commit fbc656f978
16 changed files with 91 additions and 65 deletions

View File

@@ -8,9 +8,8 @@ import Photographer from '@material-ui/icons/Person';
import Download from '@material-ui/icons/GetApp';
const toDataURL = async (url) => {
const response = await fetch(url);
const blob = await response.blob();
return URL.createObjectURL(blob);
const res = await fetch(url);
return URL.createObjectURL(await res.blob());
};
const downloadImage = async (info) => {
@@ -31,7 +30,7 @@ export default function PhotoInformation(props) {
}
return (
<div className='photoInformation' style={{'display': 'none'}}>
<div className='photoInformation' style={{ 'display': 'none' }}>
<h1>{language.credit} <span id='credit'>{props.info.credit}</span></h1>
<Info className='photoInformationHover'/>
<div className={props.className || 'infoCard'}>