sublinks / sublinks-frontend

MIT License
17 stars 5 forks source link

Fix comment feed hydration error #116

Open kgilles opened 6 months ago

kgilles commented 6 months ago

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.