UNPKG

search-suggestion

Version:

Simple, lightweight, flexible search suggestion, autocomplete component

29 lines (27 loc) 852 B
import Document, { Head, Main, NextScript } from 'next/document'; import { ServerStyleSheet } from 'styled-components'; export default class ServerDocument extends Document { render() { const sheet = new ServerStyleSheet(); const main = sheet.collectStyles(<Main />); const styleTags = sheet.getStyleElement(); return ( <html> <Head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <link rel="manifest" href="/static/manifest.json" /> <link rel="shortcut icon" href="/static/img/favicon.ico" /> {styleTags} </Head> <body className="custom_class"> {this.props.customValue} {main} <NextScript /> </body> </html> ); } }