sforkowany z mirror/soapbox
rodzic
58bdf4b1c7
commit
1dc78e4e95
|
@ -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>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue