chore: move IUser to base types
This commit is contained in:
parent
003f9fca68
commit
010676aa85
|
@ -21,7 +21,7 @@ import UserItem from '../presentation/UserItem';
|
||||||
import { getUserSelector } from '../selectors/login';
|
import { getUserSelector } from '../selectors/login';
|
||||||
import { ChatsStackParamList } from '../stacks/types';
|
import { ChatsStackParamList } from '../stacks/types';
|
||||||
import { withTheme } from '../theme';
|
import { withTheme } from '../theme';
|
||||||
import { ApplicationState, BaseScreen } from '../types';
|
import { ApplicationState, BaseScreen, IUser } from '../types';
|
||||||
import { showErrorAlert } from '../utils/info';
|
import { showErrorAlert } from '../utils/info';
|
||||||
import log, { events, logEvent } from '../utils/log';
|
import log, { events, logEvent } from '../utils/log';
|
||||||
import sharedStyles from './Styles';
|
import sharedStyles from './Styles';
|
||||||
|
@ -29,15 +29,6 @@ import sharedStyles from './Styles';
|
||||||
const ITEM_WIDTH = 250;
|
const ITEM_WIDTH = 250;
|
||||||
const getItemLayout = (_: any, index: number) => ({ length: ITEM_WIDTH, offset: ITEM_WIDTH * index, index });
|
const getItemLayout = (_: any, index: number) => ({ length: ITEM_WIDTH, offset: ITEM_WIDTH * index, index });
|
||||||
|
|
||||||
interface IUser {
|
|
||||||
_id: string;
|
|
||||||
name: string;
|
|
||||||
fname: string;
|
|
||||||
search?: boolean;
|
|
||||||
// username is used when is from searching
|
|
||||||
username?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
users: IUser[];
|
users: IUser[];
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
|
|
Loading…
Reference in New Issue