Spaces:
Running
Running
axeronis commited on
Commit ·
cb3f8d3
1
Parent(s): 735c3a0
fix(build): define missing mounted state in ChatHeader
Browse files
frontend/components/ChatWindow/ChatHeader.tsx
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
|
| 3 |
import { cn } from '@/lib/utils'
|
| 4 |
import { ArrowLeft, Bot, Brain, Calendar, Info, Loader2, MoreVertical, Sparkles, GraduationCap } from 'lucide-react'
|
|
|
|
| 5 |
import { motion } from 'framer-motion'
|
| 6 |
import type { Lead } from '@/types'
|
| 7 |
|
|
@@ -32,6 +33,11 @@ export function ChatHeader({
|
|
| 32 |
onOpenBookingModal,
|
| 33 |
onTrainAI,
|
| 34 |
}: ChatHeaderProps) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
if (!mounted) return null
|
| 36 |
|
| 37 |
return (
|
|
|
|
| 2 |
|
| 3 |
import { cn } from '@/lib/utils'
|
| 4 |
import { ArrowLeft, Bot, Brain, Calendar, Info, Loader2, MoreVertical, Sparkles, GraduationCap } from 'lucide-react'
|
| 5 |
+
import { useState, useEffect } from 'react'
|
| 6 |
import { motion } from 'framer-motion'
|
| 7 |
import type { Lead } from '@/types'
|
| 8 |
|
|
|
|
| 33 |
onOpenBookingModal,
|
| 34 |
onTrainAI,
|
| 35 |
}: ChatHeaderProps) {
|
| 36 |
+
const [mounted, setMounted] = useState(false)
|
| 37 |
+
|
| 38 |
+
useEffect(() => {
|
| 39 |
+
setMounted(true)
|
| 40 |
+
}, [])
|
| 41 |
if (!mounted) return null
|
| 42 |
|
| 43 |
return (
|