townhall: Compare numbers
This commit is contained in:
parent
55247b366c
commit
35b44f08c4
@ -36,6 +36,8 @@ class App extends React.Component {
|
||||
console.log(ev)
|
||||
let update = JSON.parse(ev.data)
|
||||
|
||||
update.Update.Weight = Number(update.Update.Weight)
|
||||
|
||||
let wdiff = update.Update.Weight - (this.state[update.From] || {Weight: update.Update.Weight}).Weight
|
||||
wdiff = <span style={{color: wdiff < 0 ? '#f00' : '#f0f0f0'}}>{wdiff}</span>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user