From edd63a4025ae7a9f07edd05718d05821719917f2 Mon Sep 17 00:00:00 2001 From: Nathaniel Sneddon Date: Wed, 1 Nov 2023 17:31:07 -0600 Subject: [PATCH] Removed defaultProps as they are deprecated --- src/components/BingMapsReact.jsx | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/components/BingMapsReact.jsx b/src/components/BingMapsReact.jsx index 9e23906..3d821ec 100644 --- a/src/components/BingMapsReact.jsx +++ b/src/components/BingMapsReact.jsx @@ -2,14 +2,14 @@ import React, { useEffect, useRef, useCallback } from "react"; export default function BingMapsReact({ - bingMapsKey, - height, - mapOptions, - onMapReady, - pushPins, - pushPinsWithInfoboxes, - viewOptions, - width, + bingMapsKey = null, + height = '100%', + mapOptions = null, + onMapReady = null, + pushPins = null, + pushPinsWithInfoboxes = null, + viewOptions = null, + width = '100%', }) { // refs const mapContainer = useRef(null); @@ -175,13 +175,3 @@ export default function BingMapsReact({
); } -BingMapsReact.defaultProps = { - bingMapsKey: null, - mapOptions: null, - height: "100%", - onMapReady: null, - pushPins: null, - pushPinsWithInfoboxes: null, - viewOptions: null, - width: "100%", -};