Skip to content

fix: hydration mismatch in NostrIdentityProvider - #34

Merged
comwanga merged 2 commits into
mainfrom
feat/escrow-agent-discovery
Aug 8, 2026
Merged

fix: hydration mismatch in NostrIdentityProvider#34
comwanga merged 2 commits into
mainfrom
feat/escrow-agent-discovery

Conversation

@comwanga

@comwanga comwanga commented Aug 8, 2026

Copy link
Copy Markdown
Owner

The typeof window branch in NostrIdentityProvider caused the server to render a different component tree than the client, triggering a React hydration mismatch on the agent page.

Fix: Removed the conditional render branch and replaced it with a mounted state flag. Both server and first client render now use capability: null. The actual capability is loaded from sessionStorage in a useEffect after mount, which then re-renders.

…mismatch

The typeof window branch caused the server to render a different component
tree than the client. Replaced with a mounted flag that ensures both server
and first client render use capability: null. sessionStorage is read in a
useEffect after mount, which then re-renders with the real capability.
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
squadsync Ready Ready Preview Aug 8, 2026 5:16pm

@comwanga
comwanga marked this pull request as ready for review August 8, 2026 17:18
@comwanga
comwanga merged commit 8e0cebd into main Aug 8, 2026
6 checks passed
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.

1 participant