little hack for now because the old pasting wasn't updating state

This commit is contained in:
Arjun Patel
2022-01-17 17:47:56 -08:00
parent 8a8a7eca44
commit 6e3d1d0ff7
+4 -6
View File
@@ -41,16 +41,14 @@ export default function CreateOrUpdateRoomModal(props: IModalProps) {
setRoomType(props.updateRoom.type);
setRoomAppxDateTime(props.updateRoom.approximateDateTime);
} else {
// update state when user does ctrl + v
resetForm();
setRoomLink(pastedLink);
}
}, [props.updateRoom]);
}, [showModalType]);
// update state when user does ctrl + v
useEffect(() => {
// todo: check if link is valid google meet link? again?
console.log(pastedLink);
setRoomLink(pastedLink);
}, [pastedLink]);
const handleCloseModal = () => {
resetForm();