The Hero server component awaited getMessages(locale) which called Directus with a 2-second timeout. On testing.dk0.dev (or when Directus is unreachable), this blocked the entire Hero render for ~2s → LCP 3.0s / 2320ms rendering delay. Changes: - Hero.tsx: remove getMessages() call entirely; use t() for all strings - messages/en.json + de.json: add hero.badge, hero.line1, hero.line2 keys - lib/i18n-loader.ts: invert lookup order — JSON first, Directus only as override for keys absent from JSON. Previously Directus was tried first for every key, causing ~49 parallel network requests per page load in HomePageServer (aboutT + projectsT + contactT + footerT translations). Now all JSON-backed keys return instantly without any network I/O. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5.9 KiB
5.9 KiB