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 { StackNavigationProp } from '@react-navigation/stack';
import { Dispatch } from 'redux'; import { Dispatch } from 'redux';
export interface IBaseScreen<T extends Record<string, object | undefined>, S extends string> { export interface IBaseScreen<T extends Record<string, object | undefined>, S extends string> {
navigation: StackNavigationProp<T, S>; navigation: StackNavigationProp<T, S>;
route: RouteProp<T, S>;
dispatch: Dispatch; dispatch: Dispatch;
theme: string; theme: string;
} }

View File

@ -1,5 +1,4 @@
import { Q } from '@nozbe/watermelondb'; import { Q } from '@nozbe/watermelondb';
import { RouteProp } from '@react-navigation/native';
import orderBy from 'lodash/orderBy'; import orderBy from 'lodash/orderBy';
import React from 'react'; import React from 'react';
import { FlatList, View } from 'react-native'; import { FlatList, View } from 'react-native';
@ -36,8 +35,7 @@ interface ISelectedUsersViewState {
chats: ISelectedUser[]; chats: ISelectedUser[];
} }
interface ISelectedUsersViewProps extends IBaseScreen { interface ISelectedUsersViewProps extends IBaseScreen<ChatsStackParamList, 'SelectedUsersView'> {
route: RouteProp<ChatsStackParamList, 'SelectedUsersView'>;
// REDUX STATE // REDUX STATE
users: ISelectedUser[]; users: ISelectedUser[];
loading: boolean; loading: boolean;