// @flow import * as React from 'react'; import {ActivityIndicator, Card, Paragraph, withTheme} from "react-native-paper"; import {StyleSheet} from "react-native"; 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 ? VOTE SUBMITTED. THX FOR YOUR PARTICIPATION : null } { this.props.hasVoted ? THX FOR THE VOTE : null } { this.props.startDate !== null ? RESULTS AVAILABLE AT {this.props.startDate} : RESULTS AVAILABLE SHORTLY } ); } } const styles = StyleSheet.create({ card: { margin: 10, }, icon: { backgroundColor: 'transparent' }, }); export default withTheme(VoteWait);