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(blog): hydration error on date #8871

Merged
merged 1 commit into from
May 16, 2023
Merged

fix(blog): hydration error on date #8871

merged 1 commit into from
May 16, 2023

Conversation

LeoMcA
Copy link
Member

@LeoMcA LeoMcA commented May 16, 2023

SSR renders an en-US format date, client side renders in the user's locale


How did you test this change?

  • yarn dev
  • once that finishes run yarn build:blog in a separate terminal
  • once that finishes, load http://localhost:5042/en-US/blog/ with JS disabled
  • observe date in US format, e.g. "May 10, 2023"
  • enable JS, reload page
  • observe date in (in my case) GB format, e.g. "10 May 2023"
  • observe no hydration errors in console

SSR renders an en-US format date, client side renders in the user's locale
@LeoMcA LeoMcA requested a review from fiji-flo May 16, 2023 19:59
@LeoMcA LeoMcA removed the request for review from fiji-flo May 16, 2023 20:33
@LeoMcA LeoMcA merged commit a271858 into main May 16, 2023
@LeoMcA LeoMcA deleted the blog-hydration-errors branch May 16, 2023 20:33
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