Browse Source

elections history render fix

v0.25
pbca26 7 years ago
parent
commit
050aa72ea8
  1. 8
      react/src/components/dashboard/notaryElectionsModal/notaryElectionsModal.js

8
react/src/components/dashboard/notaryElectionsModal/notaryElectionsModal.js

@ -383,6 +383,7 @@ class NotaryElectionsModal extends React.Component {
isAuth: true, isAuth: true,
pub: res.result, pub: res.result,
}); });
this.sync();
} else { } else {
Store.dispatch( Store.dispatch(
triggerToaster( triggerToaster(
@ -402,8 +403,6 @@ class NotaryElectionsModal extends React.Component {
// reset login input vals // reset login input vals
this.refs.loginPassphrase.value = ''; this.refs.loginPassphrase.value = '';
this.refs.loginPassphraseTextarea.value = ''; this.refs.loginPassphraseTextarea.value = '';
this.sync();
} }
logout() { logout() {
@ -466,8 +465,8 @@ class NotaryElectionsModal extends React.Component {
_items.push( _items.push(
<tr key={ `notary-elections-history-${i}` }> <tr key={ `notary-elections-history-${i}` }>
<td>{ _history[i].address }</td> <td>{ _history[i].address }</td>
<td>{ Number(_history[i].amount) }</td> <td>{ _history[i].amount === 'unknown' ? 'unknown' : Number(_history[i].amount) }</td>
<td>{ this.renderHistoryRegion(_history[i].region) }</td> <td>{ _history[i].region === 'unknown' ? 'unknown' : this.renderHistoryRegion(_history[i].region) }</td>
<td>{ secondsToString(_history[i].timestamp) }</td> <td>{ secondsToString(_history[i].timestamp) }</td>
</tr> </tr>
); );
@ -612,6 +611,7 @@ class NotaryElectionsModal extends React.Component {
</div> </div>
} }
{ this.state.isAuth && { this.state.isAuth &&
this.state.userType === 'voter' &&
<div className={ 'elections-user-type' + (this.state.voteType === 'single' ? ' margin-bottom-30' : '') }> <div className={ 'elections-user-type' + (this.state.voteType === 'single' ? ' margin-bottom-30' : '') }>
<a <a
className={ this.state.voteType === 'multi' ? 'active' : '' } className={ this.state.voteType === 'multi' ? 'active' : '' }

Loading…
Cancel
Save