Add thumbnail sending to assets for map grid

This commit is contained in:
Mitchell McCaffrey
2021-04-29 15:44:57 +10:00
parent 0ccee84cbf
commit 71edf5c5c5
6 changed files with 38 additions and 48 deletions

View File

@@ -11,7 +11,12 @@ import Grid from "../Grid";
function MapGrid({ map }) {
let mapSourceMap = map;
const mapURL = useDataURL(mapSourceMap, defaultMapSources);
const mapURL = useDataURL(
mapSourceMap,
defaultMapSources,
undefined,
map.type === "file"
);
const [mapImage, mapLoadingStatus] = useImage(mapURL);
const [isImageLight, setIsImageLight] = useState(true);