diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx index 15b1fd9..b8d61eb 100644 --- a/app/[locale]/page.tsx +++ b/app/[locale]/page.tsx @@ -135,7 +135,7 @@ export default function Home() { - {t('hero.liveCounter', { count: userCount.toLocaleString() })} + {t('hero.liveCounter')} diff --git a/components/chat/floating-chat.tsx b/components/chat/floating-chat.tsx index e9d19e4..134d1e4 100644 --- a/components/chat/floating-chat.tsx +++ b/components/chat/floating-chat.tsx @@ -77,7 +77,12 @@ export default function FloatingChat() { setIsOpen(true) setIsMinimized(false) if (typeof detail.fullscreen === 'boolean') setIsFullscreen(detail.fullscreen) - if (typeof detail.initialMessage === 'string') setInputMessage(detail.initialMessage) + if (typeof detail.initialMessage === 'string') { + // Use setTimeout to ensure the input is set after the component is fully rendered + setTimeout(() => { + setInputMessage(detail.initialMessage) + }, 100) + } } window.addEventListener('floating-chat:open', handler as EventListener) return () => window.removeEventListener('floating-chat:open', handler as EventListener) diff --git a/messages/en.json b/messages/en.json index 34e75f3..8c308e9 100644 --- a/messages/en.json +++ b/messages/en.json @@ -39,7 +39,8 @@ "cta": { "readBible": "Start reading", "askAI": "Ask AI" - } + }, + "liveCounter": "Join thousands of believers studying God's word right now" }, "features": { "title": "Discover the features", @@ -71,9 +72,6 @@ "description": "Join our community and discover the wisdom of Scripture", "startNow": "Start now" }, - "hero": { - "liveCounter": "Join {count} believers studying God's word right now" - }, "demo": { "title": "See It In Action", "subtitle": "Experience our AI assistant immediately without any sign-up required", @@ -84,7 +82,7 @@ "dailyVerse": { "title": "Today's Verse", "date": "January 15, 2024", - "verse": "For I know the plans I have for you,\" declares the Lord, \"plans to prosper you and not to harm you, plans to give you hope and a future.", + "verse": "For I know the plans I have for you, declares the Lord, plans to prosper you and not to harm you, plans to give you hope and a future.", "reference": "Jeremiah 29:11", "discuss": "Discuss This Verse", "save": "Save", diff --git a/messages/ro.json b/messages/ro.json index 29f0c2b..4b29774 100644 --- a/messages/ro.json +++ b/messages/ro.json @@ -40,7 +40,7 @@ "readBible": "Începe să citești", "askAI": "Întreabă AI" }, - "liveCounter": "Alătură-te la {count} credincioși care studiază Cuvântul lui Dumnezeu chiar acum" + "liveCounter": "Alătură-te la mii de credincioși care studiază Cuvântul lui Dumnezeu chiar acum" }, "features": { "title": "Descoperă funcționalitățile",