Make Webamp image look nicer on retina displays

This commit is contained in:
Jordan Eldredge 2019-03-23 14:23:18 -07:00
parent 6febf90fdb
commit 30e6f1cf3c

View file

@ -1,7 +1,11 @@
import WebampLazy from "../../js/webampLazy";
import React, { useEffect, useState, useRef } from "react";
// @ts-ignore
import icon from "../images/manifest/icon-48x48.png";
import iconLarge from "../images/manifest/icon-96x96.png";
// @ts-ignore
import iconSmall from "../images/manifest/icon-48x48.png";
const icon = window.devicePixelRatio > 1 ? iconLarge : iconSmall;
interface Props {
webamp: WebampLazy;
@ -43,7 +47,7 @@ const WebampIcon = (props: Props) => {
onClick={() => setSelected(true)}
className={selected ? "selected" : ""}
>
<img src={icon} />
<img src={icon} style={{ width: 48, height: 48 }} />
<div className="webamp-icon-title">Webamp</div>
</div>
)