Fix MapProvider prop types (#1843)

This commit is contained in:
Daniel Sherman 2022-05-19 22:16:45 -06:00 committed by GitHub
parent 7c71ed9b12
commit ecb27c8d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ type MountedMapsContextValue = {
export const MountedMapsContext = React.createContext<MountedMapsContextValue>(null);
export const MapProvider: React.FC<{}> = props => {
export const MapProvider: React.FC<{children?: React.ReactNode}> = props => {
const [maps, setMaps] = useState<{[id: string]: MapRef}>({});
const onMapMount = useCallback((map: MapRef, id: string = 'default') => {