Added progress indicator to map data loading

This commit is contained in:
Mitchell McCaffrey
2020-06-28 12:28:58 +10:00
parent a370b8e11d
commit bf022e2686
6 changed files with 63 additions and 9 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ function Map({
disabledTokens,
}) {
const { tokensById } = useContext(TokenDataContext);
const { isLoading } = useContext(MapLoadingContext);
const { isLoading, loadingProgress } = useContext(MapLoadingContext);
const gridX = map && map.gridX;
const gridY = map && map.gridY;
@@ -299,7 +299,7 @@ function Map({
{tokenMenu}
{tokenDragOverlay}
<MapDice />
{isLoading && <LoadingOverlay />}
{isLoading && <LoadingOverlay progress={loadingProgress} />}
</>
}
selectedToolId={selectedToolId}