mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-05-25 15:44:05 +00:00
bdbcb337ca
## Summary - On direct page load to `#/home` (or a full refresh), `renderHome()` runs before the async `/api/config/theme` fetch resolves, so `window.SITE_CONFIG` is `undefined` and `homeCfg` is `null` — showing SF defaults instead of the site's customisations. - When navigating from another page the fetch has already completed, which is why it works in that case. - Fix: subscribe to `theme-refresh` (the event fired ~300 ms after the config is fetched and applied) and re-render; clean up the listener in `destroy()`. This matches the existing pattern used by `analytics.js` and `map.js`. Fixes #1193 ## Test plan - [x] Hard-refresh directly to `#/home` — customised `heroTitle`, `heroSubtitle`, steps, footer links must render correctly - [x] Navigate from another page to Home — still renders correctly (no regression) - [x] Site with no custom config — defaults render, no JS errors - [x] Theme customiser changes while on Home page — page re-renders (theme-refresh re-render still works) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>