chore: update IBaseScreen definitions

This commit is contained in:
GleidsonDaniel 2021-12-29 18:44:04 -03:00
parent 0cf9765f86
commit bc92a4f29d
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;