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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user