Import createref separately
This commit is contained in:
parent
2af87fa8b8
commit
3fc9c1b74a
1 changed files with 2 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { useCallback, useEffect, useState } from "react";
|
import React, { useCallback, useEffect, useState, createRef } from "react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
||||||
import styles from "./PTTButton.module.css";
|
import styles from "./PTTButton.module.css";
|
||||||
|
|
@ -48,7 +48,7 @@ export const PTTButton: React.FC<Props> = ({
|
||||||
startTalking,
|
startTalking,
|
||||||
stopTalking,
|
stopTalking,
|
||||||
}) => {
|
}) => {
|
||||||
const buttonRef = React.createRef<HTMLButtonElement>();
|
const buttonRef = createRef<HTMLButtonElement>();
|
||||||
|
|
||||||
const [{ isHeld, activeTouchID }, setState] = useState<State>({
|
const [{ isHeld, activeTouchID }, setState] = useState<State>({
|
||||||
isHeld: false,
|
isHeld: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue