diff --git a/src/room/PTTButton.tsx b/src/room/PTTButton.tsx index 2231f36f..a671186d 100644 --- a/src/room/PTTButton.tsx +++ b/src/room/PTTButton.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useCallback, useEffect, useState } from "react"; +import React, { useCallback, useEffect, useState, createRef } from "react"; import classNames from "classnames"; import styles from "./PTTButton.module.css"; @@ -48,7 +48,7 @@ export const PTTButton: React.FC = ({ startTalking, stopTalking, }) => { - const buttonRef = React.createRef(); + const buttonRef = createRef(); const [{ isHeld, activeTouchID }, setState] = useState({ isHeld: false,