Skip to content

Commit

Permalink
improve again
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjaiyan-dev committed Aug 8, 2022
1 parent e1b3c42 commit cb0d295
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/basic-features/script.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,15 +285,15 @@ import { useRef } from "react";
import Script from 'next/script';

export default function Home() {
const ref = useRef();
const mapRef = useRef();
return (
<>
<div ref={ref}></div>
<div ref={mapRef}></div>
<Script
id="google-maps"
src="https://maps.googleapis.com/maps/api/js"
onReady={() => {
new google.maps.Map(ref.current, {
new google.maps.Map(mapRef.current, {
center: { lat: -34.397, lng: 150.644 },
zoom: 8,
})
Expand Down

0 comments on commit cb0d295

Please sign in to comment.