docs: fix code snippet in next/script (#64119)

Removed unintended use of `PagesOnly` component inside a code block.
This commit is contained in:
Alexander 2024-04-05 20:12:12 +03:00 committed by GitHub
parent 0baa85dec7
commit 027d7ab186
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -363,14 +363,14 @@ export default function Page() {
<PagesOnly>
```jsx
import { useRef } from 'react';
import Script from 'next/script';
import { useRef } from 'react'
import Script from 'next/script'
export default function Page() {
const mapRef = useRef();
const mapRef = useRef()
return (
<PagesOnly>
<>
<div ref={mapRef}></div>
<Script
id="google-maps"
@ -379,11 +379,11 @@ export default function Page() {
new google.maps.Map(mapRef.current, {
center: { lat: -34.397, lng: 150.644 },
zoom: 8,
});
})
}}
/>
</>
);
)
}
```