import React, { useEffect, useState } from "react"; import styles from "../styles/Sidebar.module.css"; type Props = { selectedCell: [number, number] | null; setSelectedCell: (cell: [number, number] | null) => void; map: React.MutableRefObject; }; const Sidebar: React.FC = ({ selectedCell, setSelectedCell, map }) => { const onClose = () => { setSelectedCell(null); requestAnimationFrame(() => { if (map.current) map.current.resize() }); } return selectedCell && (

Cell {selectedCell[0]}, {selectedCell[1]}

); }; export default Sidebar;