Fix Discuss this verse functionality and update live counter to static text
- Replace dynamic live counter with static "thousands of believers" text in both languages - Fix Discuss this verse feature with proper timing and quote escaping - Add setTimeout delay to ensure chat input is set after component renders - Remove unescaped quotes from English daily verse text - Merge duplicate hero translation objects in both language files - Clean up debug console.log statements 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -135,7 +135,7 @@ export default function Home() {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Box sx={{ mb: 4, p: 2, bgcolor: 'rgba(255,255,255,0.1)', borderRadius: 2 }}>
|
<Box sx={{ mb: 4, p: 2, bgcolor: 'rgba(255,255,255,0.1)', borderRadius: 2 }}>
|
||||||
<Typography variant="body2" sx={{ opacity: 0.9 }}>
|
<Typography variant="body2" sx={{ opacity: 0.9 }}>
|
||||||
{t('hero.liveCounter', { count: userCount.toLocaleString() })}
|
{t('hero.liveCounter')}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap' }}>
|
<Box sx={{ display: 'flex', gap: 2, flexWrap: 'wrap' }}>
|
||||||
|
|||||||
@@ -77,7 +77,12 @@ export default function FloatingChat() {
|
|||||||
setIsOpen(true)
|
setIsOpen(true)
|
||||||
setIsMinimized(false)
|
setIsMinimized(false)
|
||||||
if (typeof detail.fullscreen === 'boolean') setIsFullscreen(detail.fullscreen)
|
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)
|
window.addEventListener('floating-chat:open', handler as EventListener)
|
||||||
return () => window.removeEventListener('floating-chat:open', handler as EventListener)
|
return () => window.removeEventListener('floating-chat:open', handler as EventListener)
|
||||||
|
|||||||
@@ -39,7 +39,8 @@
|
|||||||
"cta": {
|
"cta": {
|
||||||
"readBible": "Start reading",
|
"readBible": "Start reading",
|
||||||
"askAI": "Ask AI"
|
"askAI": "Ask AI"
|
||||||
}
|
},
|
||||||
|
"liveCounter": "Join thousands of believers studying God's word right now"
|
||||||
},
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"title": "Discover the features",
|
"title": "Discover the features",
|
||||||
@@ -71,9 +72,6 @@
|
|||||||
"description": "Join our community and discover the wisdom of Scripture",
|
"description": "Join our community and discover the wisdom of Scripture",
|
||||||
"startNow": "Start now"
|
"startNow": "Start now"
|
||||||
},
|
},
|
||||||
"hero": {
|
|
||||||
"liveCounter": "Join {count} believers studying God's word right now"
|
|
||||||
},
|
|
||||||
"demo": {
|
"demo": {
|
||||||
"title": "See It In Action",
|
"title": "See It In Action",
|
||||||
"subtitle": "Experience our AI assistant immediately without any sign-up required",
|
"subtitle": "Experience our AI assistant immediately without any sign-up required",
|
||||||
@@ -84,7 +82,7 @@
|
|||||||
"dailyVerse": {
|
"dailyVerse": {
|
||||||
"title": "Today's Verse",
|
"title": "Today's Verse",
|
||||||
"date": "January 15, 2024",
|
"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",
|
"reference": "Jeremiah 29:11",
|
||||||
"discuss": "Discuss This Verse",
|
"discuss": "Discuss This Verse",
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
"readBible": "Începe să citești",
|
"readBible": "Începe să citești",
|
||||||
"askAI": "Întreabă AI"
|
"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": {
|
"features": {
|
||||||
"title": "Descoperă funcționalitățile",
|
"title": "Descoperă funcționalitățile",
|
||||||
|
|||||||
Reference in New Issue
Block a user