Fix title being empty
This commit is contained in:
parent
e7fd95e2cd
commit
3690de9fe0
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + React + TS</title>
|
||||
<title>FF Jitsi Rooms</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
|
|
@ -11,10 +11,13 @@ function useRoomName() {
|
|||
[setRoomName]
|
||||
);
|
||||
|
||||
const submitRoomName = useCallback(() => {
|
||||
setRoomNameInUrl(roomName);
|
||||
setRoomNameInTitle(roomName);
|
||||
}, [roomName]);
|
||||
const submitRoomName = useCallback(
|
||||
() => {
|
||||
setRoomNameInUrl(roomName);
|
||||
setRoomNameInTitle(roomName);
|
||||
},
|
||||
[roomName]
|
||||
);
|
||||
|
||||
return { roomName, updateRoomName, submitRoomName };
|
||||
}
|
||||
|
@ -34,7 +37,9 @@ function setRoomNameInUrl(roomName: string) {
|
|||
}
|
||||
|
||||
function setRoomNameInTitle(roomName: string) {
|
||||
document.title = roomName;
|
||||
if (!!roomName) {
|
||||
document.title = roomName;
|
||||
}
|
||||
}
|
||||
|
||||
export { useRoomName };
|
||||
|
|
Loading…
Reference in New Issue