add starter PoolMap

This commit is contained in:
Michael Fatemi 2021-04-10 23:51:36 -04:00
parent 600ee1c8f7
commit 04e637683d
2 changed files with 26 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import Typography from '@material-ui/core/Typography';
import Comment from './Comment';
import { makeAPIGetCall, makeAPIPostCall } from '../api/utils';
import AuthenticationContext from './AuthenticationContext';
import PoolMap from './PoolMap';
// eslint-disable-next-line
const SAMPLE_POOL = {
@ -126,6 +127,8 @@ export default function Pool() {
</Button>
)}
<hr />
<PoolMap />
<hr />
<Textarea
cols={80}
ref={commentTextareaRef}

View File

@ -1,3 +1,25 @@
import { GoogleMap, LoadScript, Marker } from '@react-google-maps/api';
import { GOOGLE_MAPS_API_KEY } from '../api/google';
const center = {
lat: 0,
lng: -180,
};
const position = {
lat: 37.772,
lng: -122.214,
};
export default function PoolMap() {
//
return (
<LoadScript googleMapsApiKey={GOOGLE_MAPS_API_KEY}>
<GoogleMap
mapContainerStyle={{ width: '400px', height: '400px' }}
center={center}
>
<Marker position={position} />
</GoogleMap>
</LoadScript>
);
}