diff --git a/pages/_document.tsx b/pages/_document.tsx
new file mode 100644
index 0000000..42871f5
--- /dev/null
+++ b/pages/_document.tsx
@@ -0,0 +1,32 @@
+import Document from 'next/document';
+import { ServerStyleSheet } from 'styled-components';
+
+class RootDocument extends Document {
+ static async getInitialProps(ctx: any) {
+ const sheet = new ServerStyleSheet();
+ const originalRenderPage = ctx.renderPage;
+
+ try {
+ ctx.renderPage = () =>
+ originalRenderPage({
+ enhanceApp: (App: any) => (props: any) =>
+ sheet.collectStyles(