diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index ae32685..6d3e77c 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -205,8 +205,9 @@ const Navbar = () => { useEffect(() => { if (sections.length > 0 && sections[0].message) { const newTitle = - sections[0].message.query.substring(0, 30) + '...' || - 'New Conversation'; + sections[0].message.query.length > 30 + ? `${sections[0].message.query.substring(0, 30).trim()}...` + : sections[0].message.query || 'New Conversation'; setTitle(newTitle); const newTimeAgo = formatTimeDifference(