2022-02-02 23:02:40 +00:00
|
|
|
import { useEffect } from "react";
|
|
|
|
|
|
|
|
export function usePageTitle(title) {
|
|
|
|
useEffect(() => {
|
2022-02-03 05:48:44 +00:00
|
|
|
const productName =
|
|
|
|
import.meta.env.VITE_PRODUCT_NAME || "Matrix Video Chat";
|
|
|
|
document.title = title ? `${productName} | ${title}` : productName;
|
2022-02-02 23:02:40 +00:00
|
|
|
}, [title]);
|
|
|
|
}
|