Render the logo img on the SSR pass — no more wordmark-only flash

Fixkamolos
Ya
18 Mei 2026, 03:43 UTC
Mwandishi
Kamo
Ahadi ya
15a3c48

ThemeLogo's empty-string initial logoSrc + useEffect-to-fill pattern meant the SSR render returned the wordmark fallback, then hydration populated the src. If anything in that chain hiccuped (it did — the hostname was localhost so getThemePath() returned empty and the chain re-resolved every render), the user kept seeing the wordmark forever. Now ThemeLogo: - Reads the SSR-resolved tenant URL straight from OrgContext via a new useThemedPath() hook. The root layout computes themedPath from the request's Host header server-side and threads it through OrgProvider. - Builds the candidate URL list at render time (memoised), starting with the tenant URL when one exists. - Renders the <img> tag from the very first render with src already pointing at the right candidate — no useEffect dance, no empty-src flash, no SSR/hydration mismatch. - onError walks the list forward in-place. Only when every candidate fails does it render the wordmark fallback. Source priority is unchanged: assetBasePath (only used by the styleguide simulator) → tenant MinIO (logo-full-on-dark → logo-full → logo-on-dark → logo) → local /public/ (logo-full.svg → logo.svg) → wordmark fallback. Build 32/32.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei