Update src/components/Navbar.tsx

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
Kushagra Srivastava
2025-12-27 13:32:20 +05:30
committed by GitHub
parent 9620e63e3f
commit 7f3f881964

View File

@@ -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(