docs: fix code snippet in next/script (#64119)
Removed unintended use of `PagesOnly` component inside a code block.
This commit is contained in:
parent
0baa85dec7
commit
027d7ab186
1 changed files with 6 additions and 6 deletions
|
@ -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,
|
||||
});
|
||||
})
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue