// @flow import * as React from 'react'; import {ActivityIndicator, Card, Paragraph, withTheme} from "react-native-paper"; import {StyleSheet} from "react-native"; import i18n from 'i18n-js'; type Props = { startDate: string | null, justVoted: boolean, hasVoted: boolean, isVoteRunning: boolean, } class VoteWait extends React.Component { colors: Object; constructor(props) { super(props); this.colors = props.theme.colors; } shouldComponentUpdate() { return false; } render() { return ( } /> { this.props.justVoted ? {i18n.t('voteScreen.wait.messageSubmitted')} : null } { this.props.hasVoted ? {i18n.t('voteScreen.wait.messageVoted')} : null } { this.props.startDate !== null ? {i18n.t('voteScreen.wait.messageDate') + ' ' + this.props.startDate} : {i18n.t('voteScreen.wait.messageDateUndefined')} } ); } } const styles = StyleSheet.create({ card: { margin: 10, }, icon: { backgroundColor: 'transparent' }, }); export default withTheme(VoteWait);