Buckets:
| import type { DocumentContext, DocumentInitialProps } from "next/document"; | |
| import Document, { Html, Head, Main, NextScript } from "next/document"; | |
| import cxs from "cxs"; | |
| export default class MyDocument extends Document { | |
| static async getInitialProps( | |
| ctx: DocumentContext, | |
| ): Promise<DocumentInitialProps> { | |
| const initialProps = await Document.getInitialProps(ctx); | |
| const styles = cxs.css(); | |
| cxs.reset(); | |
| return { | |
| ...initialProps, | |
| styles: ( | |
| <> | |
| {initialProps.styles} | |
| <style dangerouslySetInnerHTML={{ __html: styles }} /> | |
| </> | |
| ), | |
| }; | |
| } | |
| render() { | |
| return ( | |
| <Html> | |
| <Head /> | |
| <body> | |
| <Main /> | |
| <NextScript /> | |
| </body> | |
| </Html> | |
| ); | |
| } | |
| } | |
Xet Storage Details
- Size:
- 779 Bytes
- Xet hash:
- 50fcefc2a6be5f61fe0254b3286f35319879f5c31c5155618bd06f5f0d8e68aa
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.