diff --git a/native/more/build-info.react.js b/native/more/build-info.react.js index a4c194a72..430183071 100644 --- a/native/more/build-info.react.js +++ b/native/more/build-info.react.js @@ -1,99 +1,83 @@ // @flow -import PropTypes from 'prop-types'; import * as React from 'react'; import { View, Text, ScrollView } from 'react-native'; -import { connect } from 'lib/utils/redux-utils'; - import { persistConfig, codeVersion } from '../redux/persist'; -import type { AppState } from '../redux/redux-setup'; -import { styleSelector } from '../themes/colors'; - -type Props = {| - // Redux state - styles: typeof styles, -|}; -class BuildInfo extends React.PureComponent { - static propTypes = { - styles: PropTypes.objectOf(PropTypes.object).isRequired, - }; +import { useStyles } from '../themes/colors'; - render() { - return ( - - - - Release - ALPHA - - - Code version - {codeVersion} - - - State version - {persistConfig.version} - +function BuildInfo() { + const styles = useStyles(unboundStyles); + return ( + + + + Release + ALPHA + + + Code version + {codeVersion} + + + State version + {persistConfig.version} - - - - Thank you for helping to test the alpha! - - + + + + + Thank you for helping to test the alpha! + - - ); - } + + + ); } -const styles = { +const unboundStyles = { label: { color: 'panelForegroundTertiaryLabel', fontSize: 16, paddingRight: 12, }, releaseText: { color: 'redText', fontSize: 16, }, row: { flexDirection: 'row', justifyContent: 'space-between', paddingVertical: 6, }, scrollView: { backgroundColor: 'panelBackground', }, scrollViewContentContainer: { paddingTop: 24, }, section: { backgroundColor: 'panelForeground', borderBottomWidth: 1, borderColor: 'panelForegroundBorder', borderTopWidth: 1, marginBottom: 24, paddingHorizontal: 24, paddingVertical: 6, }, text: { color: 'panelForegroundLabel', fontSize: 16, }, thanksText: { color: 'panelForegroundLabel', flex: 1, fontSize: 16, textAlign: 'center', }, }; -const stylesSelector = styleSelector(styles); -export default connect((state: AppState) => ({ - styles: stylesSelector(state), -}))(BuildInfo); +export default BuildInfo;