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 comment feed hydration error #116

Open
kgilles opened this issue Mar 26, 2024 · 0 comments
Open

Fix comment feed hydration error #116

kgilles opened this issue Mar 26, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@kgilles
Copy link
Member

kgilles commented Mar 26, 2024

In our comment feeds we use the CommentHeader component to display comment information. This includes the date the comment was created or updated. We show the date using toLocaleString(). This causes a hydration error when the server and browser have different time zones.

We want to prevent this hydration error from occurring while still ensuring we show the datetime string in the users' own time zone.

@kgilles kgilles converted this from a draft issue Mar 26, 2024
@kgilles kgilles added the bug Something isn't working label Mar 26, 2024
@kgilles kgilles added the good first issue Good for newcomers label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant