diff --git a/native/components/list-loading-indicator.react.js b/native/components/list-loading-indicator.react.js index 518c109da..648d06b2d 100644 --- a/native/components/list-loading-indicator.react.js +++ b/native/components/list-loading-indicator.react.js @@ -1,39 +1,29 @@ // @flow -import { connect } from 'lib/utils/redux-utils'; import * as React from 'react'; import { ActivityIndicator } from 'react-native'; -import type { AppState } from '../redux/redux-setup'; -import type { Colors } from '../themes/colors'; -import { colorsSelector, styleSelector } from '../themes/colors'; +import { useStyles, useColors } from '../themes/colors'; -type Props = {| - // Redux state - colors: Colors, - styles: typeof styles, -|}; -function ListLoadingIndicator(props: Props) { - const { listBackgroundLabel } = props.colors; +function ListLoadingIndicator() { + const styles = useStyles(unboundStyles); + const colors = useColors(); + const { listBackgroundLabel } = colors; return ( ); } -const styles = { +const unboundStyles = { loadingIndicator: { backgroundColor: 'listBackground', flex: 1, padding: 10, }, }; -const stylesSelector = styleSelector(styles); -export default connect((state: AppState) => ({ - colors: colorsSelector(state), - styles: stylesSelector(state), -}))(ListLoadingIndicator); +export default ListLoadingIndicator;