import React, { useRef } from 'react';
import useClickMarker from '../../../hooks/useClickMarker';
import useMap from '../../../hooks/useMap';
import styles from './GamePanel.module.css';

export default ({ onMarkerMoved }) => {
  const mapDivRef = useRef(null);
  const mapRef = useMap(mapDivRef);
  useClickMarker(mapRef, onMarkerMoved);
  return <div className={styles.fullsize} ref={mapDivRef} />;
};
