fix(web): fix navigator.onLine hydration mismatch (React error #418) #4054
ccantynzcommented Jun 16, 2026
Originally written by @vercel[bot] on GitHub.
Deployment failed with the following error:
There is no GitHub account connected to this Vercel account.ccantynzcommented Jun 16, 2026
Originally written by @vercel[bot] on GitHub.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| alec-rae-com-admin | Jun 16, 2026 12:19am |
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/AlecRae.com/pull/77
$(cat <<'EOF'
Summary
OfflineComposeBannerandOfflineBadgewere initializingisOnlineastrue(assuming online), then immediately setting it tonavigator.onLinein auseEffect. If the client is offline, the server and client rendered different output, causing React hydration error #418.null(unknown) and only show the offline UI whenisOnline === false. Both server and client render nothing on first pass, eliminating the mismatch.Test plan
https://claude.ai/code/session_017mhAkS4qhMjcvVnyFi61xp EOF )
Generated by Claude Code