Created
December 19, 2021 15:35
-
-
Save sidharrth2002/1e0767c93cc7ed5df709f6804559f807 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { isLoaded } = useJsApiLoader({ | |
id: "google-map-script", | |
googleMapsApiKey: process.env.REACT_APP_GOOGLE_MAPS_API_KEY, | |
libraries, | |
}); | |
{loading || !isLoaded ? ( | |
<Center | |
h="80vh" | |
flexDirection="column" | |
justifyContent="center" | |
alignItems="center" | |
> | |
<Spinner /> | |
</Center> | |
) : ( | |
<GoogleMap | |
mapContainerStyle={mapContainerStyle} | |
zoom={8} | |
center={center} | |
onLoad={onLoad} | |
onUnmount={onUnmount} | |
options={options} | |
onClick={() => { | |
setModalVisible(false); | |
setFoodbankModalVisible(false); | |
}} | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment