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

feat: add hydration check to EditProfileButton component #1752

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

olavoparno
Copy link
Contributor

@olavoparno olavoparno commented Jan 16, 2025

closes #1691

fixes

What changed? Why?

  • Introduced useHasHydrated hook to ensure the component only renders after hydration.
  • Updated EditProfileButton to conditionally return null if hydration has not occurred, improving performance and preventing potential rendering issues.

PlanetScale deploy request

Notes to reviewers

How has it been tested?

  • Locally
  • Vercel Preview Branch
  • Unit test
  • Functional test

- Introduced `useHasHydrated` hook to ensure the component only renders after hydration.
- Updated `EditProfileButton` to conditionally return null if hydration has not occurred, improving performance and preventing potential rendering issues.
Copy link

vercel bot commented Jan 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
swc-web ✅ Ready (Inspect) Visit Preview Jan 17, 2025 0:01am

@olavoparno olavoparno merged commit 9b5f432 into main Jan 17, 2025
2 of 3 checks passed
@olavoparno olavoparno deleted the fix/resolve-profile-hydration branch January 17, 2025 12:42
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