From 5bbb45792bb7c657bbeb770fc0b9b76bdf6177f5 Mon Sep 17 00:00:00 2001 From: Nathaniel Sneddon Date: Tue, 26 Mar 2024 09:03:15 -0600 Subject: [PATCH 1/2] 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..8d66c3d 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, + mapOption = null, + height = "100%", + 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%", -}; From fc09955d993cc7d6dd32b30b8790c12763aac1ff Mon Sep 17 00:00:00 2001 From: Nathaniel Sneddon Date: Tue, 26 Mar 2024 09:04:27 -0600 Subject: [PATCH 2/2] Fixed the order --- src/components/BingMapsReact.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BingMapsReact.jsx b/src/components/BingMapsReact.jsx index 8d66c3d..8302a7b 100644 --- a/src/components/BingMapsReact.jsx +++ b/src/components/BingMapsReact.jsx @@ -3,8 +3,8 @@ import React, { useEffect, useRef, useCallback } from "react"; export default function BingMapsReact({ bingMapsKey = null, - mapOption = null, height = "100%", + mapOptions = null, onMapReady = null, pushPins = null, pushPinsWithInfoboxes = null,