Skip to content

Commit f6b1469

Browse files
committed
[governance] Update agendas to show pending (#2013)
1 parent be09f59 commit f6b1469

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

app/components/views/GovernancePage/Blockchain/AgendaCard.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ const AgendaCard = ({
1414
: ({ className: "agenda-card", onClick })
1515
)}>
1616
<div className="agenda-card-bottom">
17-
<AgendaFinishedIndicator />
17+
{agenda.finished ? (
18+
<AgendaFinishedIndicator />
19+
) : (
20+
<div className="agenda-card-indicator-pending">
21+
<T id="agenda.card.inProgressIndicator" m="In Progress" />
22+
</div>
23+
)}
1824
<div className="agenda-card-bottom-cfg">
1925
{agenda.getDescription()} <span className="agenda-card-bottom-cfg-last">
2026
<T id="agenda.overview.idLabel" m="Agenda ID" />:

app/components/views/GovernancePage/Blockchain/AgendaOverview/Overview.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { AgendaFinishedIndicator } from "../helpers";
44
import "style/AgendaOverview.less";
55

66
const Overview = ({
7+
isFinished,
78
agendaId,
89
agendaDescription,
910
choices,
@@ -62,7 +63,13 @@ const Overview = ({
6263
</div>
6364
<div className="agenda-bottom">
6465
<div className="agenda-bottom-overview">
65-
<AgendaFinishedIndicator />
66+
{isFinished ? (
67+
<AgendaFinishedIndicator />
68+
) : (
69+
<div className="agenda-card-indicator-pending">
70+
<T id="agenda.overview.inProgressIndicator" m="In Progress" />
71+
</div>
72+
)}
6673
</div>
6774
<div className="agenda-bottom-options">
6875
<KeyBlueButton

app/components/views/GovernancePage/Blockchain/AgendaOverview/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class AgendaOverview extends React.Component {
2121
const { selectedChoiceId, disabled } = this.state;
2222
const { setSelecedChoiceId, updatePreferences } = this;
2323
const activeChoiceId = this.props.selectedChoice;
24+
const isFinished = agenda.finished;
2425
const agendaId = agenda.getId();
2526
const agendaDescription = agenda.getDescription();
2627
const choices = agenda.getChoicesList().map(choice => ({
@@ -31,6 +32,7 @@ class AgendaOverview extends React.Component {
3132
return (
3233
<Overview
3334
{...{
35+
isFinished,
3436
agendaId,
3537
agendaDescription,
3638
selectedChoiceId,

0 commit comments

Comments
 (0)