Update maps and tokens to have thumbnails and removed loading of all files on load

This commit is contained in:
Mitchell McCaffrey
2021-02-08 16:53:56 +11:00
parent b9993e1a0b
commit 24e64f9d32
16 changed files with 418 additions and 137 deletions

View File

@@ -16,6 +16,9 @@ import { MapStageProvider, useMapStage } from "../../contexts/MapStageContext";
import AuthContext, { useAuth } from "../../contexts/AuthContext";
import SettingsContext, { useSettings } from "../../contexts/SettingsContext";
import KeyboardContext from "../../contexts/KeyboardContext";
import TokenDataContext, {
useTokenData,
} from "../../contexts/TokenDataContext";
import { GridProvider } from "../../contexts/GridContext";
import { useKeyboard } from "../../contexts/KeyboardContext";
@@ -178,6 +181,7 @@ function MapInteraction({
const auth = useAuth();
const settings = useSettings();
const tokenData = useTokenData();
const mapInteraction = {
stageScale,
@@ -227,7 +231,9 @@ function MapInteraction({
height={mapHeight}
>
<MapStageProvider value={mapStageRef}>
{mapLoaded && children}
<TokenDataContext.Provider value={tokenData}>
{mapLoaded && children}
</TokenDataContext.Provider>
</MapStageProvider>
</GridProvider>
</MapInteractionProvider>