Skip to content

Commit 2bcb2c2

Browse files
feat: synchronize conversation name to document.title
1 parent 76c2b01 commit 2bcb2c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/header/ConversationHeaderInfo.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Show } from 'solid-js'
1+
import { Show, createEffect } from 'solid-js'
22
import { useStore } from '@nanostores/solid'
33
import { conversationMap, currentConversationId } from '@/stores/conversation'
44
import { useI18n } from '@/hooks'
@@ -11,6 +11,8 @@ export default () => {
1111
return $conversationMap()[$currentConversationId()]
1212
}
1313

14+
createEffect(() => { document.title = currentConversation() ? `Anse • ${(currentConversation().name || t('conversations.untitled'))}` : 'Anse' })
15+
1416
return (
1517
<div class="fi gap-1 max-w-40vw px-2 overflow-hidden text-sm">
1618
<Show when={currentConversation()}>

0 commit comments

Comments
 (0)