cal/pages/_document.tsx
Mihai C 903f7729c7
feat: add better error handling (#605)
* feat: add better error handling

* refactor: update after review

* refactor: remove unnecessary code

* refactor: better path structure

* refactor: fetch-wrapper after code review

Co-authored-by: Mihai Colceriu <colceriumi@gmail.com>
2021-09-09 16:51:06 +03:00

33 lines
1.1 KiB
TypeScript

import Document, { DocumentContext, Head, Html, Main, NextScript, DocumentProps } from "next/document";
type Props = Record<string, unknown> & DocumentProps;
class MyDocument extends Document<Props> {
static async getInitialProps(ctx: DocumentContext) {
const initialProps = await Document.getInitialProps(ctx);
return { ...initialProps };
}
render() {
return (
<Html>
<Head>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000" />
<meta name="msapplication-TileColor" content="#ff0000" />
<meta name="theme-color" content="#ffffff" />
</Head>
<body className="dark:bg-black bg-gray-100">
<Main />
<NextScript />
</body>
</Html>
);
}
}
export default MyDocument;