chore: update IBaseScreen definitions
This commit is contained in:
parent
0cf9765f86
commit
bc92a4f29d
|
@ -1,8 +1,10 @@
|
|||
import { RouteProp } from '@react-navigation/native';
|
||||
import { StackNavigationProp } from '@react-navigation/stack';
|
||||
import { Dispatch } from 'redux';
|
||||
|
||||
export interface IBaseScreen<T extends Record<string, object | undefined>, S extends string> {
|
||||
navigation: StackNavigationProp<T, S>;
|
||||
route: RouteProp<T, S>;
|
||||
dispatch: Dispatch;
|
||||
theme: string;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { Q } from '@nozbe/watermelondb';
|
||||
import { RouteProp } from '@react-navigation/native';
|
||||
import orderBy from 'lodash/orderBy';
|
||||
import React from 'react';
|
||||
import { FlatList, View } from 'react-native';
|
||||
|
@ -36,8 +35,7 @@ interface ISelectedUsersViewState {
|
|||
chats: ISelectedUser[];
|
||||
}
|
||||
|
||||
interface ISelectedUsersViewProps extends IBaseScreen {
|
||||
route: RouteProp<ChatsStackParamList, 'SelectedUsersView'>;
|
||||
interface ISelectedUsersViewProps extends IBaseScreen<ChatsStackParamList, 'SelectedUsersView'> {
|
||||
// REDUX STATE
|
||||
users: ISelectedUser[];
|
||||
loading: boolean;
|
||||
|
|
Loading…
Reference in New Issue