Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
public-report
marcin mikołajczak 2021-09-10 00:48:06 +02:00
rodzic 58bdf4b1c7
commit 1dc78e4e95
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -43,9 +43,9 @@ class Reactions extends ImmutablePureComponent {
static propTypes = { static propTypes = {
params: PropTypes.object.isRequired, params: PropTypes.object.isRequired,
dispatch: PropTypes.array.isRequired, dispatch: PropTypes.func.isRequired,
reactions: PropTypes.array, reactions: ImmutablePropTypes.orderedSet,
accounts: PropTypes.array, accounts: ImmutablePropTypes.orderedSet,
status: ImmutablePropTypes.map, status: ImmutablePropTypes.map,
}; };
@ -101,7 +101,7 @@ class Reactions extends ImmutablePureComponent {
reactions.size > 0 && ( reactions.size > 0 && (
<div className='reaction__filter-bar'> <div className='reaction__filter-bar'>
<button onClick={this.handleFilterChange('')}>All</button> <button onClick={this.handleFilterChange('')}>All</button>
{reactions?.filter(reaction => reaction.count).map(reaction => <button onClick={this.handleFilterChange(reaction.name)}>{reaction.name} {reaction.count}</button>)} {reactions?.filter(reaction => reaction.count).map(reaction => <button key={reaction.name} onClick={this.handleFilterChange(reaction.name)}>{reaction.name} {reaction.count}</button>)}
</div> </div>
) )
} }