Adding date for closed polls

This commit is contained in:
Richard Ramos 2018-12-03 10:31:41 -04:00
parent be5f68da30
commit 51eac2c16b
2 changed files with 2 additions and 1 deletions

View File

@ -130,6 +130,7 @@ class LandingPage extends Component {
<Card className="card poll">
<CardContent>
<Typography gutterBottom component="h2">{closedPoll.content.title}</Typography>
<span className="pollClosingDate">Closed: {new Date(openPoll._endTime * 1000).DDMMYYYY()} </span>
<p className="stats">
Voters: {closedPoll._voters}<br />
Total votes: {closedPoll._votesSum}<br />

View File

@ -99,7 +99,7 @@ class OtherPolls extends Component {
<CardContent>
<Typography gutterBottom component="h2">{p.content.title}</Typography>
<Typography component="p" dangerouslySetInnerHTML={{__html: p.content.description}}></Typography>
{pollType == "open" && <span className="pollClosingDate">Closes: {new Date(p._endTime * 1000).DDMMYYYY()}</span> }
<span className="pollClosingDate">{pollType == "open" ? "Closes: " : "Closed: "} {new Date(p._endTime * 1000).DDMMYYYY()}</span>
<p className="stats">
Voters: {p._voters}<br />
Total votes: {p._votesSum}<br />