mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
Update wrong code snippet (#34520)
Following the [example](https://nextjs.org/docs/advanced-features/custom-document), avoiding the following error: > Identifier 'Document' has already been declared ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
This commit is contained in:
@@ -18,7 +18,7 @@ Add the stylesheet in a custom `Document` component.
|
||||
|
||||
```jsx
|
||||
// pages/_document.js
|
||||
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
||||
import { Html, Head, Main, NextScript } from 'next/document'
|
||||
|
||||
export default function Document() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user