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 { 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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue