fix: reset room name state when room instance changes
This commit is contained in:
parent
d2348d2ea2
commit
23b1216e37
1 changed files with 2 additions and 0 deletions
|
|
@ -20,6 +20,8 @@ export const useRoomName = (room: Room): string => {
|
|||
const [name, setName] = useState(room.name);
|
||||
|
||||
useEffect(() => {
|
||||
setName(room.name);
|
||||
|
||||
const handleRoomNameChange: RoomEventHandlerMap[RoomEvent.Name] = () => {
|
||||
setName(room.name);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue