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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user