Changeset View
Changeset View
Standalone View
Standalone View
native/components/user-list.react.js
// @flow | // @flow | ||||
import _sum from 'lodash/fp/sum.js'; | import _sum from 'lodash/fp/sum.js'; | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import { FlatList } from 'react-native'; | import { FlatList } from 'react-native'; | ||||
import type { UserListItem } from 'lib/types/user-types.js'; | import type { UserListItem, AccountUserInfo } from 'lib/types/user-types.js'; | ||||
import { UserListUser, getUserListItemHeight } from './user-list-user.react.js'; | import { UserListUser, getUserListItemHeight } from './user-list-user.react.js'; | ||||
import { type IndicatorStyle, useIndicatorStyle } from '../themes/colors.js'; | import { type IndicatorStyle, useIndicatorStyle } from '../themes/colors.js'; | ||||
import type { TextStyle } from '../types/styles.js'; | import type { TextStyle } from '../types/styles.js'; | ||||
type BaseProps = { | type BaseProps = { | ||||
+userInfos: $ReadOnlyArray<UserListItem>, | +userInfos: $ReadOnlyArray<UserListItem>, | ||||
+onSelect: (userID: string) => void, | +onSelect: (user: AccountUserInfo) => void, | ||||
+itemTextStyle?: TextStyle, | +itemTextStyle?: TextStyle, | ||||
}; | }; | ||||
type Props = { | type Props = { | ||||
...BaseProps, | ...BaseProps, | ||||
// Redux state | // Redux state | ||||
+indicatorStyle: IndicatorStyle, | +indicatorStyle: IndicatorStyle, | ||||
}; | }; | ||||
class UserList extends React.PureComponent<Props> { | class UserList extends React.PureComponent<Props> { | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |