1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Update styletron example (#5879)

Missed a fix for the styletron api. Previous config won't work for server rendering.
This commit is contained in:
Leon 2018-12-13 17:23:06 +01:00 committed by Tim Neutkens
parent 620b426903
commit c2a208d141

View file

@ -16,8 +16,8 @@ export default class MyDocument extends Document {
{this.props.stylesheets.map((sheet, i) => (
<style
className='_styletron_hydrate_'
dangerouslySetInnerHTML={{ __html: sheet.css }}
media={sheet.media || null}
dangerouslySetInnerHTML={{ __html: sheet }}
media={sheet.attrs ? sheet.attrs.media : null}
key={i}
/>
))}