Typescript

This commit is contained in:
Mitchell McCaffrey
2021-07-16 21:39:45 +10:00
parent 74cabdd798
commit e48d19a817
14 changed files with 81 additions and 50 deletions
+3 -1
View File
@@ -7,7 +7,9 @@ import { mapSources as defaultMapSources } from "../maps";
import { Map } from "../types/Map";
function useMapImage(map: Map) {
function useMapImage(
map: Map
): [HTMLImageElement | undefined, "loaded" | "loading" | "failed"] {
const mapURL = useDataURL(map, defaultMapSources);
const [mapImage, mapImageStatus] = useImage(mapURL || "");