mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-05-01 08:42:38 +00:00
feat(navbar): Use trimmed content
This commit is contained in:
@ -11,7 +11,7 @@ const Navbar = ({ messages }: { messages: Message[] }) => {
|
|||||||
if (messages.length > 0) {
|
if (messages.length > 0) {
|
||||||
const newTitle =
|
const newTitle =
|
||||||
messages[0].content.length > 20
|
messages[0].content.length > 20
|
||||||
? `${messages[0].content.substring(0, 20)}...`
|
? `${messages[0].content.substring(0, 20).trim()}...`
|
||||||
: messages[0].content;
|
: messages[0].content;
|
||||||
setTitle(newTitle);
|
setTitle(newTitle);
|
||||||
const newTimeAgo = formatTimeDifference(
|
const newTimeAgo = formatTimeDifference(
|
||||||
|
Reference in New Issue
Block a user