Unverified Commit 027d7ab1 authored by Alexander's avatar Alexander Committed by GitHub

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

Removed unintended use of `PagesOnly` component inside a code block.
parent 0baa85de
...@@ -363,14 +363,14 @@ export default function Page() { ...@@ -363,14 +363,14 @@ export default function Page() {
<PagesOnly> <PagesOnly>
```jsx ```jsx
import { useRef } from 'react'; import { useRef } from 'react'
import Script from 'next/script'; import Script from 'next/script'
export default function Page() { export default function Page() {
const mapRef = useRef(); const mapRef = useRef()
return ( return (
<PagesOnly> <>
<div ref={mapRef}></div> <div ref={mapRef}></div>
<Script <Script
id="google-maps" id="google-maps"
...@@ -379,11 +379,11 @@ export default function Page() { ...@@ -379,11 +379,11 @@ export default function Page() {
new google.maps.Map(mapRef.current, { new google.maps.Map(mapRef.current, {
center: { lat: -34.397, lng: 150.644 }, center: { lat: -34.397, lng: 150.644 },
zoom: 8, zoom: 8,
}); })
}} }}
/> />
</> </>
); )
} }
``` ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment