Skip to content

Commit d572524

Browse files
committed
fix: resolve ESLint errors
1 parent 5694494 commit d572524

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/MagicCodeInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type {ForwardedRef, KeyboardEvent} from 'react';
22
import React, {forwardRef, useEffect, useImperativeHandle, useRef, useState} from 'react';
3-
import type {NativeSyntheticEvent, TextInputFocusEventData, TextInputKeyPressEventData} from 'react-native';
3+
import type {NativeSyntheticEvent, TextInputFocusEventData, TextInputKeyPressEventData, TextInput as RNTextInput} from 'react-native';
44
import {StyleSheet, View} from 'react-native';
55
import {Gesture, GestureDetector} from 'react-native-gesture-handler';
66
import Animated, {useAnimatedStyle, useSharedValue, withDelay, withRepeat, withSequence, withTiming} from 'react-native-reanimated';
@@ -31,7 +31,7 @@ const useMagicCodePaste = (inputRef: React.RefObject<BaseTextInputRef | null>, o
3131
return;
3232
}
3333

34-
const isFocused = inputRef.current.isFocused?.();
34+
const isFocused = (inputRef.current as RNTextInput)?.isFocused?.() ?? false;
3535
if (!isFocused) {
3636
return;
3737
}

0 commit comments

Comments
 (0)