@@ -79,25 +79,16 @@ export class Governance extends React.Component<RouteComponentProps<any>> {
7979 const outcome = getVoteOutcome ( tally ) ;
8080
8181 const proposalHistoryState = {
82- created : {
83- done : true ,
84- timestamp : voteStartDate ,
85- show : true ,
86- } ,
8782 active : {
8883 done : now . isAfter ( voteStartDate ) ,
8984 timestamp : voteStartDate ,
9085 show : true ,
9186 } ,
92- failed : {
93- done : hasVoteEnded && outcome === 'rejected' ,
87+ finalized : {
88+ done : hasVoteEnded && ( outcome === 'rejected' || outcome === 'accepted' ) ,
9489 timestamp : this . _proposalData ?. voteEndDate ,
95- show : hasVoteEnded && outcome === 'rejected' ,
96- } ,
97- accepted : {
98- done : hasVoteEnded && outcome === 'accepted' ,
99- timestamp : this . _proposalData ?. voteEndDate ,
100- show : ( hasVoteStarted && ! hasVoteEnded ) || ( hasVoteEnded && outcome === 'accepted' ) ,
90+ outcome,
91+ show : true ,
10192 } ,
10293 } ;
10394
@@ -136,6 +127,7 @@ export class Governance extends React.Component<RouteComponentProps<any>> {
136127 < Ticks >
137128 { Object . keys ( proposalHistoryState ) . map ( ( state : string ) => {
138129 const historyState = proposalHistoryState [ state as ProposalState ] ;
130+ console . log ( historyState , state ) ;
139131 if ( ! historyState . show ) {
140132 return null ;
141133 }
@@ -150,7 +142,7 @@ export class Governance extends React.Component<RouteComponentProps<any>> {
150142 }
151143 />
152144 </ Tick >
153- { ! [ 'accepted' , 'failed' ] . includes ( state ) && (
145+ { ! [ 'accepted' , 'failed' , 'finalized' ] . includes ( state ) && (
154146 < Connector className = { state === 'active' ? 'small' : '' } />
155147 ) }
156148 </ >
@@ -160,6 +152,7 @@ export class Governance extends React.Component<RouteComponentProps<any>> {
160152 < HistoryCells >
161153 { Object . keys ( proposalHistoryState ) . map ( ( state : string ) => {
162154 const historyState = proposalHistoryState [ state as ProposalState ] ;
155+ console . log ( historyState ) ;
163156 if ( ! historyState . show ) {
164157 return null ;
165158 }
@@ -172,15 +165,21 @@ export class Governance extends React.Component<RouteComponentProps<any>> {
172165 fontWeight = { 400 }
173166 >
174167 { state }
168+ { historyState . done &&
169+ ( historyState . outcome === 'rejected' ||
170+ historyState . outcome === 'accepted' )
171+ ? ` - ${ historyState . outcome } `
172+ : '' }
175173 </ StateTitle >
176174 < Text
177175 fontColor = { colors . textDarkSecondary }
178176 fontFamily = "Formular"
179177 fontSize = "17px"
180178 fontWeight = { 300 }
181179 >
180+ < div > </ div >
182181 { historyState . done
183- ? historyState . timestamp . format ( 'MMMM Do, YYYY - hh:mm a' )
182+ ? ` ${ historyState . timestamp . format ( 'MMMM Do, YYYY - hh:mm a' ) } `
184183 : 'TBD' }
185184 </ Text >
186185 </ CellContent >
0 commit comments