on master help sign in
senate: only show document poll list if not empty
commitc9823c9eee4337d9d18f2a09af3a355a60478393 authorfang <git@fang.io> dateWed 12 May 2021, 16:23 (5 years ago) parent28669e8
1 file changed+24−36
src/views/Senate.js+24−36
src/views/Senate.js+24−36
@@ -190,42 +190,30 @@ export default function Senate() {
190190 {majorityList}
191191 </Grid.Item>
192192
193− <Grid.Divider className="mv4" />
194−
195− <Grid.Item full as={Grid}>
196− <Grid.Item full as={P}>
197− Open document polls:
198− </Grid.Item>
199− {openList}
200− </Grid.Item>
201−
202− <BridgeForm onValues={onDocumentChange}>
203− {({ onSubmit, values }) => (
204− // <>
205− <Grid.Item
206− full
207− as={InlineEthereumTransaction}
208− {...bind}
209− onReturn={didVote}
210− />
211−
212− // <Grid.Divider />
213− //
214− // <Grid.Item
215− // full
216− // as={Input}
217− // type="textarea"
218− // placeholder="Input some text to find its hash..."
219− // name="document"
220− // className="mt4"
221− // />
222− //
223− // <Grid.Item full as={CopiableAddress}>
224− // {documentHash}
225− // </Grid.Item>
226− // </>
227− )}
228− </BridgeForm>
193+ {openList.length > 0 && (
194+ <>
195+ <Grid.Divider className="mv4" />
196+
197+ <Grid.Item full as={Grid}>
198+ <Grid.Item full as={P}>
199+ Open document polls:
200+ </Grid.Item>
201+ {openList}
202+ </Grid.Item>
203+
204+ <BridgeForm onValues={onDocumentChange}>
205+ {({ onSubmit, values }) => (
206+ // <>
207+ <Grid.Item
208+ full
209+ as={InlineEthereumTransaction}
210+ {...bind}
211+ onReturn={didVote}
212+ />
213+ )}
214+ </BridgeForm>
215+ </>
216+ )}
229217 </Grid>
230218 </View>
231219 );