Set the document title to the current call name. (#2928)

Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
This commit is contained in:
Will Hunt
2025-01-08 13:24:23 +00:00
committed by GitHub
parent 00759e2431
commit 7e507d6310
3 changed files with 5 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ Please see LICENSE in the repository root for full details.
import { useEffect } from "react";
export function usePageTitle(title: string): void {
export function usePageTitle(title?: string): void {
useEffect(() => {
const productName = import.meta.env.VITE_PRODUCT_NAME || "Element Call";
document.title = title ? `${productName} | ${title}` : productName;