fix(examples/with-styled-components-babel): list should have unique key (#40215)

Fixes #40201 

## Bug

- [ ] Related issues linked using `fixes #40201`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
This commit is contained in:
Jeferson S. Brito 2022-09-05 11:35:13 -03:00 committed by GitHub
parent 866de41681
commit 591321e882
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View file

@ -7,16 +7,16 @@
},
"dependencies": {
"next": "latest",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-is": "^17.0.2",
"styled-components": "^5.2.3"
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"styled-components": "^5.3.5"
},
"devDependencies": {
"@types/node": "17.0.24",
"@types/react": "^17.0.2",
"@types/styled-components": "5.1.25",
"babel-plugin-styled-components": "^1.12.0",
"typescript": "4.6.3"
"@types/node": "18.7.14",
"@types/react": "^18.0.18",
"@types/styled-components": "5.1.26",
"babel-plugin-styled-components": "^2.0.7",
"typescript": "4.8.2"
}
}

View file

@ -18,12 +18,12 @@ export default class MyDocument extends Document {
const initialProps = await Document.getInitialProps(ctx)
return {
...initialProps,
styles: [
styles: (
<>
{initialProps.styles}
{sheet.getStyleElement()}
</>,
],
</>
),
}
} finally {
sheet.seal()