fix: type errors

This commit is contained in:
Lei Nelissen
2024-01-29 00:14:19 +01:00
parent 2d9b81651c
commit 6411bfbbb6
5 changed files with 766 additions and 210 deletions

950
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -44,8 +44,8 @@
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "^2.9.0",
"react-native-localize": "^2.2.4",
"react-native-reanimated": "^3.6.2",
"react-native-modal-datetime-picker": "^17.0.0",
"react-native-reanimated": "^3.6.2",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2",
"react-native-shadow-2": "^7.0.6",
@@ -59,7 +59,7 @@
"redux-flipper": "^2.0.2",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"styled-components": "^5.3.6"
"styled-components": "^6.1.8"
},
"devDependencies": {
"@babel/core": "^7.20.2",
@@ -72,9 +72,8 @@
"@types/node": "^20.3.1",
"@types/react-test-renderer": "^18.0.0",
"@types/redux-logger": "^3.0.9",
"@types/styled-components-react-native": "^5.2.1",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"babel-jest": "^29.3.1",
"babel-plugin-module-resolver": "^4.1.0",
"eslint": "^8.27.0",
@@ -85,7 +84,7 @@
"metro-react-native-babel-transformer": "^0.73.3",
"react-native-codegen": "^0.72.0",
"react-test-renderer": "^18.2.0",
"typescript": "^4.8.4"
"typescript": "^5.3.3"
},
"jest": {
"preset": "react-native",

View File

@@ -1,6 +1,6 @@
import React, { useCallback, useEffect, useState } from 'react';
import useQueue from '@/utility/useQueue';
import { View, StyleSheet, ListRenderItemInfo } from 'react-native';
import { View, StyleSheet, ListRenderItemInfo, FlatList } from 'react-native';
import styled, { css } from 'styled-components/native';
import useCurrentTrack from '@/utility/useCurrentTrack';
import TouchableHandler from '@/components/TouchableHandler';
@@ -18,7 +18,7 @@ import ticksToDuration from '@/utility/ticksToDuration';
const ICON_SIZE = 16;
const Container = styled.FlatList<Track>`
const Container = styled(FlatList<Track>)`
`;

View File

@@ -9,7 +9,7 @@ import { THEME_COLOR } from '@/CONSTANTS';
import { t } from '@/localisation';
import useDefaultStyles from '@/components/Colors';
import { Text } from '@/components/Typography';
import { useAppDispatch } from '@/store';
import { AppState, useAppDispatch } from '@/store';
export default function SetJellyfinServer() {
@@ -23,9 +23,11 @@ export default function SetJellyfinServer() {
const navigation = useNavigation();
// Save creedentials to store and close the modal
const saveCredentials = useCallback((credentials) => {
dispatch(setJellyfinCredentials(credentials));
navigation.dispatch(StackActions.popToTop());
const saveCredentials = useCallback((credentials: AppState['settings']['jellyfin']) => {
if (credentials) {
dispatch(setJellyfinCredentials(credentials));
navigation.dispatch(StackActions.popToTop());
}
}, [navigation, dispatch]);
return (

View File

@@ -8,7 +8,6 @@
],
},
"types": [
"@types/styled-components-react-native",
"@types/node"
],
},