fix: Fix header hydration issue & insert debug for footer#1370
Merged
rschristian merged 1 commit intomasterfrom Jan 9, 2026
Merged
fix: Fix header hydration issue & insert debug for footer#1370rschristian merged 1 commit intomasterfrom
rschristian merged 1 commit intomasterfrom
Conversation
|
Size Change: -6 B (0%) Total Size: 443 kB ℹ️ View Unchanged
|
e766070 to
e0fdac3
Compare
rschristian
commented
Jan 9, 2026
Comment on lines
-136
to
-145
| {typeof window !== 'undefined' && | ||
| Object.entries(config.locales).map(([id, label]) => ( | ||
| <button | ||
| class={cx(id == lang && style.current)} | ||
| data-value={id} | ||
| onClick={e => setLang(e.currentTarget.dataset.value)} | ||
| > | ||
| {label} | ||
| </button> | ||
| ))} |
Member
Author
There was a problem hiding this comment.
IIRC, I added the window check as we used to just roll with the hydration error as language was set during first render. A while back I fixed that so it's set in an effect after rendering, fixing the hydration issue, but evidently forgot to update this use here.
|
|
||
| const translations = useResource(() => { | ||
| if (lang == 'en') return Promise.resolve(englishTranslations); | ||
| if (lang == 'en') return englishTranslations; |
Member
Author
There was a problem hiding this comment.
This seems like a bug in how we hydrate suspense boundaries, the app shouldn't be falling over here. Not something I have time to dig too deep into though. A plain return works just as well for our needs.
JoviDeCroock
approved these changes
Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1369