@@ -86,7 +86,7 @@ export function Voting({ chainName }: VotingProps) {
8686 } ;
8787 } ) ;
8888 break ;
89- } catch ( e ) { }
89+ } catch ( e ) { }
9090 }
9191 } ) ( ) ;
9292 }
@@ -119,46 +119,46 @@ export function Voting({ chainName }: VotingProps) {
119119 { data . proposals ?. length === 0
120120 ? empty
121121 : data . proposals ?. map ( ( proposal , index ) => {
122- let tally = proposal . finalTallyResult ;
123- if (
124- proposal . status === ProposalStatus . PROPOSAL_STATUS_VOTING_PERIOD
125- ) {
126- tally = tallies [ proposal . id . toString ( ) ] ;
127- }
128- return (
129- < Box
130- my = "$8"
131- key = { proposal . id ?. toString ( ) || index }
132- position = "relative"
133- attributes = { { onClick : ( ) => onClickProposal ( index ) } }
134- >
135- { data . votes [ proposal . id . toString ( ) ] ? (
136- < Box
137- position = "absolute"
138- px = "$4"
139- py = "$2"
140- top = "$4"
141- right = "$6"
142- borderRadius = "$md"
143- backgroundColor = "$green400"
144- >
145- < Text color = "$white" fontSize = "$xs" fontWeight = "$bold" >
146- Voted
147- </ Text >
148- </ Box >
149- ) : null }
150- < GovernanceProposalItem
151- id = { `# ${ proposal . id ?. toString ( ) } ` }
152- key = { proposal . submitTime ?. getTime ( ) }
153- // @ts -ignore
154- title = { proposal . content ?. title || proposal . title || '' }
155- status = { status ( proposal . status ) }
156- votes = { votes ( tally ! ) }
157- endTime = { formatDate ( proposal . votingEndTime ) ! }
158- />
159- </ Box >
160- ) ;
161- } ) }
122+ let tally = proposal . finalTallyResult ;
123+ if (
124+ proposal . status === ProposalStatus . PROPOSAL_STATUS_VOTING_PERIOD
125+ ) {
126+ tally = tallies [ proposal . id . toString ( ) ] ;
127+ }
128+ return (
129+ < Box
130+ my = "$8"
131+ key = { proposal . id ?. toString ( ) || index }
132+ position = "relative"
133+ attributes = { { onClick : ( ) => onClickProposal ( index ) } }
134+ >
135+ { data . votes [ proposal . id . toString ( ) ] ? (
136+ < Box
137+ position = "absolute"
138+ px = "$4"
139+ py = "$2"
140+ top = "$4"
141+ right = "$6"
142+ borderRadius = "$md"
143+ backgroundColor = "$green400"
144+ >
145+ < Text color = "$white" fontSize = "$xs" fontWeight = "$bold" >
146+ Voted
147+ </ Text >
148+ </ Box >
149+ ) : null }
150+ < GovernanceProposalItem
151+ id = { `# ${ proposal . id ?. toString ( ) } ` }
152+ key = { proposal . submitTime ?. getTime ( ) }
153+ // @ts -ignore
154+ title = { proposal . content ?. title || proposal . title || '' }
155+ status = { status ( proposal . status ) }
156+ votes = { votes ( tally ! ) }
157+ endTime = { formatDate ( proposal . votingEndTime ) ! }
158+ />
159+ </ Box >
160+ ) ;
161+ } ) }
162162 </ Box >
163163 ) ;
164164
0 commit comments