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 hydration errors #141

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Fix hydration errors #141

merged 1 commit into from
Oct 30, 2024

Conversation

oiramS
Copy link
Contributor

@oiramS oiramS commented Oct 21, 2024

[PR] Fix hydration errors

Description

While working on a docker image for the ords-remix-jwt-sample it was discovered that several hydration errors where thrown in some pages of the project, this was caused by a mismatch between the client and server date used in some components to render events information.

Warning: Text content did not match. Server: "Monday September 9, 2024" Client: "Sunday September 8, 2024" p div div div withEmotionCache2/<@http://dbtools-dev.oraclecorp.com:3000/build/_shared/chunk-4M4ZAFAD.js:2360:46 CardContent2@http://dbtools-dev.oraclecorp.com:3000/build/_shared/chunk-4M4ZAFAD.js:16021:33 div withEmotionCache2/<@http://dbtools-dev.oraclecorp.com:3000/build/_shared/chunk-4M4ZAFAD.js:2360:46 
....

To fix this, we suppress this hydration warning since other alternatives involved the rewriting of some endpoints that would be too costly and for some other use cases, like the timeline feature of the home page, it would be impossible to implement it otherwise.

Fixes # (issue number)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • [N/A] New feature (non-breaking change which adds functionality)
  • [N/A] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [N/A] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
  1. Create a project using the ords-remix-jwt-sample template.
  2. Complete the required setup for the project to work.
  3. Launch the project.
  4. In Chrome, or other navigator, change the navigator (client) timezone.
  5. Open the app in the recently modified navigator.

Note that there are no hydration errors in the console and the app works as expected.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • [N/A] I have commented my code, particularly in hard-to-understand areas
  • [N/A] I have made corresponding changes to the documentation
  • My changes generate no new warnings/errors
  • [N/A] I have added tests that prove my fix is effective or that my feature works
  • [N/A] New and existing unit tests pass locally with my changes

@oiramS oiramS self-assigned this Oct 21, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 21, 2024
@oiramS oiramS assigned dbtools-antcampo and unassigned oiramS Oct 28, 2024
@dbtools-antcampo dbtools-antcampo merged commit bf73d8e into main Oct 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement. templates-ords-remix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants