stop using javascript:void 0 as a placeholder

This commit is contained in:
Matt Dunn-Rankin 2020-05-19 18:30:54 -07:00
parent 1237ed0bb2
commit 674107516c

View file

@ -135,7 +135,12 @@ function DownloadButton({ outfitState }) {
aria-label="Download"
as="a"
// eslint-disable-next-line no-script-url
href={downloadImageUrl || "javascript:void 0"}
href={downloadImageUrl || "#"}
onClick={(e) => {
if (!downloadImageUrl) {
e.preventDefault();
}
}}
download={(outfitState.name || "Outfit") + ".png"}
onMouseEnter={prepareDownload}
onFocus={prepareDownload}