diff --git a/app/gabsocial/components/button.js b/app/gabsocial/components/button.js index 2e8cf1cc1..00aeeeae9 100644 --- a/app/gabsocial/components/button.js +++ b/app/gabsocial/components/button.js @@ -1,18 +1,22 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; +import { Link } from 'react-router-dom'; +import Icon from './icon'; export default class Button extends React.PureComponent { static propTypes = { text: PropTypes.node, onClick: PropTypes.func, + to: PropTypes.string, disabled: PropTypes.bool, block: PropTypes.bool, secondary: PropTypes.bool, size: PropTypes.number, className: PropTypes.string, style: PropTypes.object, + icon: PropTypes.string, children: PropTypes.node, }; @@ -47,7 +51,7 @@ export default class Button extends React.PureComponent { 'button--block': this.props.block, }); - return ( + const btn = ( ); + + if (this.props.to) { + return ( + + {btn} + + ); + } else { + return btn; + } } } diff --git a/app/gabsocial/features/account/components/header.js b/app/gabsocial/features/account/components/header.js index 78b880dfa..4cbd371f1 100644 --- a/app/gabsocial/features/account/components/header.js +++ b/app/gabsocial/features/account/components/header.js @@ -213,6 +213,8 @@ class Header extends ImmutablePureComponent { } else if (account.getIn(['relationship', 'blocking'])) { actionBtn =