// @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'; import type {CustomTheme} from "../../../managers/ThemeManager"; type Props = { startDate: string | null, justVoted: boolean, hasVoted: boolean, isVoteRunning: boolean, theme: CustomTheme, } class VoteWait extends React.Component { shouldComponentUpdate() { return false; } render() { const colors = this.props.theme.colors; const startDate = this.props.startDate; return ( } /> { this.props.justVoted ? {i18n.t('voteScreen.wait.messageSubmitted')} : null } { this.props.hasVoted ? {i18n.t('voteScreen.wait.messageVoted')} : null } { startDate != null ? {i18n.t('voteScreen.wait.messageDate') + ' ' + startDate} : {i18n.t('voteScreen.wait.messageDateUndefined')} } ); } } const styles = StyleSheet.create({ card: { margin: 10, }, icon: { backgroundColor: 'transparent' }, }); export default withTheme(VoteWait);