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,7 +1,7 @@
import React, { useCallback, useEffect } from 'react';
import { useGetImage } from 'utility/JellyfinApi';
import { Album, NavigationProp } from '../types';
import { Text, SafeAreaView, FlatList, View } from 'react-native';
import { Text, SafeAreaView, FlatList } from 'react-native';
import { useDispatch } from 'react-redux';
import { useNavigation } from '@react-navigation/native';
import { useTypedSelector } from 'store';

View File

@@ -22,7 +22,7 @@ const Input = styled.TextInput`
export default function Settings() {
const { jellyfin, bitrate } = useSelector((state: AppState) => state.settings);
const navigation = useNavigation<NavigationProp>();
const handleClick = useCallback(() => navigation.navigate('SetJellyfinServer'), []);
const handleClick = useCallback(() => navigation.navigate('SetJellyfinServer'), [navigation]);
return (
<ScrollView>

View File

@@ -36,7 +36,7 @@ function Screens() {
return (
<Tab.Navigator
screenOptions={({ route }) => ({
tabBarIcon: ({ focused, color, size }) => {
tabBarIcon: function TabBarIcon({ color, size }) {
const Icon = getIcon(route.name);
if (!Icon) {