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

Bug: Hydration Error on Dashboard Page #35

Closed
Codehagen opened this issue May 21, 2024 · 1 comment · Fixed by #68
Closed

Bug: Hydration Error on Dashboard Page #35

Codehagen opened this issue May 21, 2024 · 1 comment · Fixed by #68
Assignees
Milestone

Comments

@Codehagen
Copy link
Owner

Codehagen commented May 21, 2024

Describe the bug

When you refresh the site you can see that we have a hydration error. This is probably the EventDetailsTable component.

Picture under is the error.
Screenshot 2024-05-21

Steps to reproduce

  1. Go to /dashboard
  2. Refresh the page
  3. See error on left corner

Expected Behavior

The page should refresh without any errors.

@Codehagen Codehagen added this to the Alpha 0.2 milestone May 21, 2024
@Amirthananth
Copy link
Contributor

The reason we are seeing this is due to the format of the date being different from the server and the client side. One way to fix it seems to be using a library like date-fns to format the date according in the EventsDashboardDetails.tsx file.

{format(new Date(event?.createdAt), "P")}

But the above method will format the date according to only a single format globally. If we want to change the region, then we might have to dynamically collect the locale and then convert it to that format I think so..

@Motormary Motormary self-assigned this Jun 14, 2024
Motormary added a commit that referenced this issue Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants