import { TileLayer } from 'react-leaflet';
import type { TileLayerConfig } from './tileLayers';

interface Props {
  config: TileLayerConfig;
}

export default function DynamicTileLayer({ config }: Props) {
  return (
    <TileLayer
      key={config.key}
      url={config.url}
      attribution={config.attribution}
      maxZoom={config.maxZoom}
    />
  );
}
