Implement comprehensive homepage enhancements and floating chat improvements

- Add dynamic date and year generation replacing static 2024 values
- Implement "Discuss this verse" feature with AI chat integration
- Fix translation key conflicts by merging duplicate hero objects
- Update Romanian translations with improved messaging
- Enhance floating chat to support initial messages via events
- Fix FORMATTING_ERROR for liveCounter with proper next-intl syntax

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
andupetcu
2025-09-22 10:39:07 +03:00
parent 72d39e74c8
commit e2c7e21967
4 changed files with 52 additions and 15 deletions

View File

@@ -70,13 +70,14 @@ export default function FloatingChat() {
scrollToBottom()
}, [messages])
// Allow external triggers to open the chat (optionally fullscreen)
// Allow external triggers to open the chat (optionally fullscreen and with initial message)
useEffect(() => {
const handler = (e: Event) => {
const detail = (e as CustomEvent).detail || {}
setIsOpen(true)
setIsMinimized(false)
if (typeof detail.fullscreen === 'boolean') setIsFullscreen(detail.fullscreen)
if (typeof detail.initialMessage === 'string') setInputMessage(detail.initialMessage)
}
window.addEventListener('floating-chat:open', handler as EventListener)
return () => window.removeEventListener('floating-chat:open', handler as EventListener)