mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-15 20:54:01 -05:00
081956742c
* removed references to hideOnMobile in column_link and getting_started * move keyboard shortcuts back below blocked users
32 lines
744 B
JavaScript
32 lines
744 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { Link } from 'react-router-dom';
|
|
|
|
const ColumnLink = ({ icon, text, to, href, method }) => {
|
|
if (href) {
|
|
return (
|
|
<a href={href} className='column-link' data-method={method}>
|
|
<i className={`fa fa-fw fa-${icon} column-link__icon`} />
|
|
{text}
|
|
</a>
|
|
);
|
|
} else {
|
|
return (
|
|
<Link to={to} className='column-link'>
|
|
<i className={`fa fa-fw fa-${icon} column-link__icon`} />
|
|
{text}
|
|
</Link>
|
|
);
|
|
}
|
|
};
|
|
|
|
ColumnLink.propTypes = {
|
|
icon: PropTypes.string.isRequired,
|
|
text: PropTypes.string.isRequired,
|
|
to: PropTypes.string,
|
|
href: PropTypes.string,
|
|
method: PropTypes.string,
|
|
};
|
|
|
|
export default ColumnLink;
|