diff --git a/frontend/src/pages/CaseDetail.jsx b/frontend/src/pages/CaseDetail.jsx index 1d6c05e..ec6a46e 100644 --- a/frontend/src/pages/CaseDetail.jsx +++ b/frontend/src/pages/CaseDetail.jsx @@ -17,7 +17,6 @@ const CaseDetail = ({ caseData, onBack, onGoToPet, currentUserId, userRole, onDi const [editedDescription, setEditedDescription] = useState(caseData?.description || ''); const [editedTitle, setEditedTitle] = useState(caseData?.title || ''); - const messagesEndRef = useRef(null); const statusConfig = STATUS_MAP[localStatus] || { label: localStatus, color: 'bg-slate-50 text-slate-500 border-slate-100' }; const isClosed = localStatus === 'CLOSED'; // Helper för att förenkla checkar @@ -65,14 +64,6 @@ const CaseDetail = ({ caseData, onBack, onGoToPet, currentUserId, userRole, onDi } }, [caseData?.id]); - const scrollToBottom = () => { - messagesEndRef.current?.scrollIntoView({ behavior: "smooth" }); - }; - - useEffect(() => { - if (timeline.length > 0) scrollToBottom(); - }, [timeline]); - useEffect(() => { const fetchAllData = async () => { if (!caseData?.id) return; @@ -224,7 +215,7 @@ const CaseDetail = ({ caseData, onBack, onGoToPet, currentUserId, userRole, onDi if (!caseData || loading) return