import {Link} from "react-router-dom"; import Button from '@material-ui/core/Button'; import React, {Component} from 'react'; import Typography from '@material-ui/core/Typography' class Results extends Component { state = { isError: false } componentDidMount(){ const {transaction} = this.props; transaction.then(receipt => { }) .catch(err => { this.setState({isError: true}); }) } render(){ const {polls} = this.props; const {isError} = this.state; if(!polls || !polls.length){ return null; } return