fix: type errors
This commit is contained in:
@@ -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>)`
|
||||
|
||||
`;
|
||||
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user