Remove unknown source from map and token tiles

This commit is contained in:
Mitchell McCaffrey 2021-04-30 11:55:21 +10:00
parent f844199172
commit fa94275ac8
3 changed files with 18 additions and 19 deletions

View File

@ -57,18 +57,20 @@ function Tile({
}}
onDoubleClick={onDoubleClick}
>
<UIImage
sx={{
width: "100%",
height: "100%",
objectFit: "contain",
position: "absolute",
top: 0,
left: 0,
}}
src={src}
alt={title}
/>
{src && (
<UIImage
sx={{
width: "100%",
height: "100%",
objectFit: "contain",
position: "absolute",
top: 0,
left: 0,
}}
src={src}
alt={title}
/>
)}
<Flex
sx={{
position: "absolute",

View File

@ -3,7 +3,7 @@ import React from "react";
import Tile from "../Tile";
import { useDataURL } from "../../contexts/AssetsContext";
import { mapSources as defaultMapSources, unknownSource } from "../../maps";
import { mapSources as defaultMapSources } from "../../maps";
function MapTile({
map,
@ -18,7 +18,7 @@ function MapTile({
const mapURL = useDataURL(
map,
defaultMapSources,
unknownSource,
undefined,
map.type === "file"
);

View File

@ -4,10 +4,7 @@ import Tile from "../Tile";
import { useDataURL } from "../../contexts/AssetsContext";
import {
tokenSources as defaultTokenSources,
unknownSource,
} from "../../tokens";
import { tokenSources as defaultTokenSources } from "../../tokens";
function TokenTile({
token,
@ -21,7 +18,7 @@ function TokenTile({
const tokenURL = useDataURL(
token,
defaultTokenSources,
unknownSource,
undefined,
token.type === "file"
);