diff --git a/src/room/PTTButton.tsx b/src/room/PTTButton.tsx index 440b548..53f6f7b 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, useState, createRef } from "react"; +import React, { useCallback, useState, useRef } from "react"; import classNames from "classnames"; import { useSpring, animated } from "@react-spring/web"; @@ -54,7 +54,7 @@ export const PTTButton: React.FC = ({ enqueueNetworkWaiting, setNetworkWaiting, }) => { - const buttonRef = createRef(); + const buttonRef = useRef(); const [activeTouchId, setActiveTouchId] = useState(null);