@@ -86,7 +86,7 @@ export function Voting({ chainName }: VotingProps) {
86
86
} ;
87
87
} ) ;
88
88
break ;
89
- } catch ( e ) { }
89
+ } catch ( e ) { }
90
90
}
91
91
} ) ( ) ;
92
92
}
@@ -119,46 +119,46 @@ export function Voting({ chainName }: VotingProps) {
119
119
{ data . proposals ?. length === 0
120
120
? empty
121
121
: 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
+ } ) }
162
162
</ Box >
163
163
) ;
164
164
0 commit comments