Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use NextJS recommended config for styled-components #68

Merged

Conversation

busybox11
Copy link
Contributor

This fixes styled-components styles not rendering on the server side.

Followed this documentation: https://nextjs.org/docs/app/building-your-application/styling/css-in-js#styled-components

For easy debug, disable JS in your devtools and go to /download. You should see something similar to this:
image

(For reference, this was taken on the production website which, from the looks of it, does not load the styled-component regardless for some reason?)

Using this fix, it does load the style:
image

If JS is disabled, you can't fill the form anyway, but this is still useful - it will prevent a partial Flash Of Unstyled Content when hydrating on the form area, will also improve layout shift, and by extension UX and SEO.

Copy link

vercel bot commented Aug 23, 2024

@busybox11 is attempting to deploy a commit to the Zen Browser Team on Vercel.

A member of the Team first needs to authorize it.

@mauro-balades mauro-balades merged commit 1ab31e5 into zen-browser:main Aug 24, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants