Refactor image drop and to a hook and move global image drop

This commit is contained in:
Mitchell McCaffrey
2021-06-07 21:08:14 +10:00
parent 98f7744c1f
commit eb9afcc66a
8 changed files with 153 additions and 115 deletions
+4 -2
View File
@@ -20,6 +20,8 @@ import Session from "./Session";
import Map from "../components/map/Map";
import TokenBar from "../components/token/TokenBar";
import GlobalImageDrop from "../components/image/GlobalImageDrop";
const defaultMapActions = {
mapDrawActions: [],
mapDrawActionIndex: -1,
@@ -457,7 +459,7 @@ function NetworkedMapAndTokens({ session }) {
}
return (
<>
<GlobalImageDrop>
<Map
map={currentMap}
mapState={currentMapState}
@@ -482,7 +484,7 @@ function NetworkedMapAndTokens({ session }) {
session={session}
/>
<TokenBar onMapTokensStateCreate={handleMapTokensStateCreate} />
</>
</GlobalImageDrop>
);
}