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() {
<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,
});
})
}}
/>
</>
);
)
}
```
......
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