Enable Game-Icons

This commit is contained in:
zkldi
2021-11-07 06:15:14 +00:00
parent eb98300a31
commit 8e57c70d36
+4 -4
View File
@@ -32,7 +32,7 @@ import {
} from "tachi-common";
import { SongsReturn } from "types/api-returns";
import { GamePT, SetState } from "types/react";
import { APIFetchV1 } from "util/api";
import { APIFetchV1, ToCDNURL } from "util/api";
import { IsSupportedGame, IsSupportedPlaytype } from "util/asserts";
import { ChangeOpacity } from "util/color-opacity";
import { NumericSOV } from "util/sorts";
@@ -242,11 +242,11 @@ function SongInfoHeader({
justifyContent: "space-evenly",
}}
>
{imgShow && (
{imgShow && "displayVersion" in song.data && (
<Col xs={12} lg={3} className="text-center">
<img
src="https://kamaitachi.xyz/static/images/gameicons/iidx/18z.png"
onError={() => setImgShow(false)}
src={ToCDNURL(`/game-icons/${game}/${song.data.displayVersion}`)}
// onError={() => seetImgShow(false)}
className="w-100"
/>
</Col>