sforkowany z mirror/soapbox
Reactions page improvements
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>public-report
rodzic
d60f187c98
commit
fc8bb22359
|
@ -16,10 +16,8 @@ export default class ColumnBackButton extends React.PureComponent {
|
|||
handleClick = () => {
|
||||
const { to } = this.props;
|
||||
|
||||
if (to) {
|
||||
this.context.router.history.push(to);
|
||||
} else if (window.history && window.history.length === 1) {
|
||||
this.context.router.history.push('/');
|
||||
if (window.history && window.history.length === 1) {
|
||||
this.context.router.history.push(to ? to : '/');
|
||||
} else {
|
||||
this.context.router.history.goBack();
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ class Reactions extends ImmutablePureComponent {
|
|||
reactions.size > 0 && (
|
||||
<div className='reaction__filter-bar'>
|
||||
<NavLink to={`/@${username}/posts/${statusId}/reactions`} exact>All</NavLink>
|
||||
{reactions?.map(reaction => <NavLink to={`/@${username}/posts/${statusId}/reactions/${reaction.name}`}>{reaction.name} {reaction.count}</NavLink>)}
|
||||
{reactions?.filter(reaction => reaction.count).map(reaction => <NavLink to={`/@${username}/posts/${statusId}/reactions/${reaction.name}`}>{reaction.name} {reaction.count}</NavLink>)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue