fix: avoid content flashing caused by missing styles in server side renders
The method is described here: https://styled-components.com/docs/advanced#nextjs and the code of the _document.tsx file comes from https://github.com/vercel/next.js/blob/main/examples/with-styled-components/pages/_document.js