This commit is contained in:
mgabdev
2020-03-24 23:08:43 -04:00
parent 0d9dbdfecd
commit 0f01c1bc97
77 changed files with 1484 additions and 4728 deletions

View File

@@ -1,8 +1,9 @@
import ImmutablePureComponent from 'react-immutable-pure-component'
import Block from './block'
import ScrollableList from './scrollable_list'
import ListItem from './list_item'
export default class List extends PureComponent {
export default class List extends ImmutablePureComponent {
static propTypes = {
items: PropTypes.array,
@@ -21,16 +22,14 @@ export default class List extends PureComponent {
emptyMessage={emptyMessage}
>
{
items.map((item, i) => {
return (
<ListItem
small={small}
key={`list-item-${i}`}
isLast={items.length - 1 === i}
{...item}
/>
)
})
items.map((item, i) => (
<ListItem
small={small}
key={`list-item-${i}`}
isLast={items.size - 1 === i}
{...item}
/>
))
}
</ScrollableList>
</Block>