Added token edit modal, refactored map and token data providers
Refactored image drop code into reusable component as well
This commit is contained in:
@@ -13,6 +13,7 @@ import useDataSource from "../../helpers/useDataSource";
|
||||
import MapInteraction from "./MapInteraction";
|
||||
|
||||
import AuthContext from "../../contexts/AuthContext";
|
||||
import TokenDataContext from "../../contexts/TokenDataContext";
|
||||
|
||||
import { mapSources as defaultMapSources } from "../../maps";
|
||||
|
||||
@@ -22,7 +23,6 @@ const mapTokenMenuClassName = "map-token__menu";
|
||||
function Map({
|
||||
map,
|
||||
mapState,
|
||||
tokens,
|
||||
onMapTokenStateChange,
|
||||
onMapTokenStateRemove,
|
||||
onMapChange,
|
||||
@@ -39,6 +39,8 @@ function Map({
|
||||
loading,
|
||||
}) {
|
||||
const { userId } = useContext(AuthContext);
|
||||
const { tokens } = useContext(TokenDataContext);
|
||||
|
||||
const mapSource = useDataSource(map, defaultMapSources);
|
||||
|
||||
function handleProxyDragEnd(isOnMap, tokenState) {
|
||||
|
||||
Reference in New Issue
Block a user