Add sorting functionality to people page
This commit is contained in:
@@ -4,6 +4,7 @@ import s from './Button.css';
|
||||
|
||||
class Button extends React.Component {
|
||||
static propTypes = {
|
||||
to: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
onClick: PropTypes.func,
|
||||
};
|
||||
@@ -12,6 +13,10 @@ class Button extends React.Component {
|
||||
if (this.props.onClick) {
|
||||
this.props.onClick(event);
|
||||
}
|
||||
|
||||
if (this.props.to) {
|
||||
window.location.href = this.props.to;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user