Skip to content

fix: removed hydration errors on intial page load#134

Merged
wasaga merged 2 commits intomainfrom
hydration-error
Jul 11, 2025
Merged

fix: removed hydration errors on intial page load#134
wasaga merged 2 commits intomainfrom
hydration-error

Conversation

@nickytonline
Copy link
Copy Markdown
Member

@nickytonline nickytonline commented Jul 11, 2025

This PR fixes the initial page load hydration errors. It was related to time of course. Server time/client time, not a fun time in hydration land.

Additionally, a utility function getTimestamp has been added to standardize timestamp generation.

Closes #133

Before

image

After

CleanShot 2025-07-11 at 15 43 24@2x

Adds a new utility function `getTimestamp` that returns the current timestamp in ISO string format. Includes unit tests to verify the function's output, ensuring it returns a valid ISO string and is close to the current time.
Refactors the timestamp handling in BotMessage, UserMessage, and Chat components to ensure consistent formatting. The timestamp is now passed as a string and parsed into a Date object where necessary. This change improves the reliability of timestamp rendering across the application.
@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 11, 2025

Deploy Preview for mcp-storybook ready!

Name Link
🔨 Latest commit d7c62ed
🔍 Latest deploy log https://app.netlify.com/projects/mcp-storybook/deploys/6871690f5fd74b000804f57e
😎 Deploy Preview https://deploy-preview-134--mcp-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nickytonline nickytonline requested review from wasaga and zeucapua July 11, 2025 19:46
@wasaga wasaga merged commit a8aac2f into main Jul 11, 2025
6 checks passed
@wasaga wasaga deleted the hydration-error branch July 11, 2025 20:06
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.

Hydration errors on initial page load

2 participants