Fix: make percentage chart work properly
Fix: code review Fix: rework components according to PR requested changes Fix: fix repeated code buildRatesNoCommission Also renames id to deviceId in transactions quer Fix: pr requested changes Chore: move inline styles to classes Chore: remove comment Fix: bad equality !process.env.NODE_ENV === 'production'
This commit is contained in:
parent
5572fb0eb1
commit
ae7eaca10c
43 changed files with 818 additions and 1578 deletions
|
|
@ -1,35 +1,21 @@
|
|||
import { withStyles } from '@material-ui/core'
|
||||
import List from '@material-ui/core/List'
|
||||
import ListItem from '@material-ui/core/ListItem'
|
||||
import ListItemText from '@material-ui/core/ListItemText'
|
||||
import * as R from 'ramda'
|
||||
import React from 'react'
|
||||
|
||||
import styles from './Alerts.styles'
|
||||
// const useStyles = makeStyles(styles)
|
||||
|
||||
const StyledListItem = withStyles(() => ({
|
||||
root: {
|
||||
...styles.root
|
||||
}
|
||||
}))(ListItem)
|
||||
|
||||
const AlertsTable = ({ numToRender, alerts }) => {
|
||||
// const classes = useStyles()
|
||||
|
||||
const alertsToRender = R.slice(0, numToRender, alerts)
|
||||
return (
|
||||
<>
|
||||
<List dense>
|
||||
{alerts.map((alert, idx) => {
|
||||
if (idx < numToRender) {
|
||||
return (
|
||||
<StyledListItem key={idx}>
|
||||
<ListItemText primary={alert.text} />
|
||||
</StyledListItem>
|
||||
)
|
||||
} else return null
|
||||
})}
|
||||
</List>
|
||||
</>
|
||||
<List dense>
|
||||
{alertsToRender.map((alert, idx) => {
|
||||
return (
|
||||
<ListItem key={idx}>
|
||||
<ListItemText primary={alert.text} />
|
||||
</ListItem>
|
||||
)
|
||||
})}
|
||||
</List>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue