Remove redundant dependencies and fix eslint issues

This commit is contained in:
Lei Nelissen
2020-07-07 13:33:08 +02:00
parent b8718b0b16
commit 1f0db4c71d
9 changed files with 12 additions and 120 deletions

View File

@@ -1,26 +1,19 @@
import React, { useCallback, useRef, useState } from 'react';
import React, { useCallback, useState } from 'react';
import styled from 'styled-components/native';
import { ALPHABET_LETTERS } from 'CONSTANTS';
import { View, LayoutChangeEvent } from 'react-native';
import { TouchableWithoutFeedback, PanGestureHandler, PanGestureHandlerGestureEvent, TapGestureHandler, TapGestureHandlerGestureEvent } from 'react-native-gesture-handler';
import {
PanGestureHandler,
PanGestureHandlerGestureEvent,
TapGestureHandler,
TapGestureHandlerGestureEvent
} from 'react-native-gesture-handler';
interface LetterContainerProps {
onPress: (letter: string) => void;
letter: string;
}
const LetterContainer: React.FC<LetterContainerProps> = ({ children, letter, onPress }) => {
const handlePress = useCallback(() => {
onPress(letter);
}, [letter, onPress]);
return (
<TouchableWithoutFeedback onPress={handlePress}>
{children}
</TouchableWithoutFeedback>
);
};
const Container = styled.View`
position: absolute;
right: 5px;