Fix linting and typescript errors
This commit is contained in:
@@ -9,9 +9,10 @@ import { useNavigation } from '@react-navigation/native';
|
||||
import ListButton from 'components/ListButton';
|
||||
import { THEME_COLOR } from 'CONSTANTS';
|
||||
import Sentry from './components/Sentry';
|
||||
import { SettingsNavigationProp } from './types';
|
||||
|
||||
export function SettingsList() {
|
||||
const navigation = useNavigation();
|
||||
const navigation = useNavigation<SettingsNavigationProp>();
|
||||
const handleLibraryClick = useCallback(() => { navigation.navigate('Library'); }, [navigation]);
|
||||
const handleCacheClick = useCallback(() => { navigation.navigate('Cache'); }, [navigation]);
|
||||
const handleSentryClick = useCallback(() => { navigation.navigate('Sentry'); }, [navigation]);
|
||||
|
||||
11
src/screens/Settings/types.ts
Normal file
11
src/screens/Settings/types.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { StackNavigationProp } from '@react-navigation/stack';
|
||||
|
||||
export type SettingsStackParams = {
|
||||
[key: string]: Record<string, unknown> | undefined;
|
||||
SettingList: undefined;
|
||||
Library: undefined;
|
||||
Cache: undefined;
|
||||
Sentry: undefined;
|
||||
};
|
||||
|
||||
export type SettingsNavigationProp = StackNavigationProp<SettingsStackParams>;
|
||||
Reference in New Issue
Block a user