Moved change map button to map component and centered it

This commit is contained in:
Mitchell McCaffrey
2020-03-20 18:06:24 +11:00
parent 33ea19fef6
commit 8b412ad482
3 changed files with 31 additions and 18 deletions

View File

@@ -13,7 +13,7 @@ import Modal from "./Modal";
const defaultMapSize = 22;
function AddMapButton({ handleMapChange }) {
function AddMapButton({ onMapChanged }) {
const fileInputRef = useRef();
function openImageDialog() {
@@ -54,7 +54,7 @@ function AddMapButton({ handleMapChange }) {
function handleDone() {
if (mapDataRef.current && mapSource) {
handleMapChange(mapDataRef.current, mapSource);
onMapChanged(mapDataRef.current, mapSource);
}
closeModal();
}