mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
git-subtree-dir: turbopack git-subtree-mainline:344ddbf093git-subtree-split:fb033c4917
35 lines
1.0 KiB
JavaScript
35 lines
1.0 KiB
JavaScript
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
import Document, { Html, Head, Main, NextScript } from 'next/document';
|
|
class MyDocument extends Document {
|
|
static async getInitialProps(ctx) {
|
|
const initialProps = await Document.getInitialProps(ctx);
|
|
return {
|
|
...initialProps,
|
|
styles: _jsxs(_Fragment, {
|
|
children: [
|
|
initialProps.styles,
|
|
_jsx("style", {
|
|
dangerouslySetInnerHTML: {
|
|
__html: `html { background: hotpink; }`
|
|
}
|
|
})
|
|
]
|
|
})
|
|
};
|
|
}
|
|
render() {
|
|
return _jsxs(Html, {
|
|
children: [
|
|
_jsx(Head, {}),
|
|
_jsxs("body", {
|
|
children: [
|
|
_jsx(Main, {}),
|
|
_jsx(NextScript, {})
|
|
]
|
|
})
|
|
]
|
|
});
|
|
}
|
|
}
|
|
export default MyDocument;
|