Optimise grid and interaction context
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import React from "react";
|
||||
|
||||
import { useAuth } from "../../contexts/AuthContext";
|
||||
import { useMapInteraction } from "../../contexts/MapInteractionContext";
|
||||
import {
|
||||
useMapWidth,
|
||||
useMapHeight,
|
||||
} from "../../contexts/MapInteractionContext";
|
||||
|
||||
import DragOverlay from "../DragOverlay";
|
||||
|
||||
@@ -15,7 +18,9 @@ function TokenDragOverlay({
|
||||
mapState,
|
||||
}) {
|
||||
const { userId } = useAuth();
|
||||
const { mapWidth, mapHeight } = useMapInteraction();
|
||||
|
||||
const mapWidth = useMapWidth();
|
||||
const mapHeight = useMapHeight();
|
||||
|
||||
function handleTokenRemove() {
|
||||
// Handle other tokens when a vehicle gets deleted
|
||||
|
||||
Reference in New Issue
Block a user