2019-10-22 21:20:10 +01:00
|
|
|
import { NavLink, withRouter } from 'react-router-dom';
|
|
|
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
2020-01-29 21:53:33 +00:00
|
|
|
import NotificationCounter from '../notification_counter';
|
|
|
|
|
2020-04-23 07:13:29 +01:00
|
|
|
// : todo :
|
|
|
|
|
2019-10-22 21:20:10 +01:00
|
|
|
const links = [
|
|
|
|
<NavLink key='pr1' className='footer-bar__link' to='/home' data-preview-title-id='column.home'>
|
2020-02-06 00:23:03 +00:00
|
|
|
<i className='tabs-bar__link__icon home' />
|
2019-10-22 21:20:10 +01:00
|
|
|
<FormattedMessage id='tabs_bar.home' defaultMessage='Home' />
|
|
|
|
</NavLink>,
|
|
|
|
<NavLink key='pr2' className='footer-bar__link' to='/notifications' data-preview-title-id='column.notifications'>
|
|
|
|
<i className='tabs-bar__link__icon notifications'/>
|
2020-01-29 16:45:17 +00:00
|
|
|
<NotificationCounter />
|
2019-10-22 21:20:10 +01:00
|
|
|
<FormattedMessage id='tabs_bar.notifications' defaultMessage='Notifications' />
|
|
|
|
</NavLink>,
|
2020-02-06 00:23:03 +00:00
|
|
|
<a key='pl5' className='footer-bar__link footer-bar__link--chat' href='https://chat.gab.com' data-preview-title-id='tabs_bar.chat'>
|
|
|
|
<Icon id='comments' className='tabs-bar__link__icon chat' />
|
|
|
|
<FormattedMessage id='tabs_bar.chat' defaultMessage='Chat' />
|
|
|
|
</a>,
|
2019-10-22 21:20:10 +01:00
|
|
|
<a key='pl4' className='footer-bar__link footer-bar__link--trends' href='https://trends.gab.com' data-preview-title-id='tabs_bar.trends'>
|
2020-02-06 00:38:02 +00:00
|
|
|
<i className='tabs-bar__link__icon trends' />
|
2019-10-22 21:20:10 +01:00
|
|
|
<FormattedMessage id='tabs_bar.trends' defaultMessage='Trends' />
|
|
|
|
</a>,
|
2020-02-06 00:38:02 +00:00
|
|
|
<NavLink key='pr3' className='footer-bar__link' to='/groups' data-preview-title-id='column.groups'>
|
|
|
|
<i className='tabs-bar__link__icon groups' />
|
|
|
|
<FormattedMessage id='tabs_bar.groups' defaultMessage='Groups' />
|
|
|
|
</NavLink>,
|
2019-10-22 21:20:10 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
export default
|
|
|
|
@injectIntl
|
|
|
|
@withRouter
|
2020-01-29 21:54:39 +00:00
|
|
|
class FooterBar extends PureComponent {
|
2019-10-22 21:20:10 +01:00
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
intl: PropTypes.object.isRequired,
|
|
|
|
}
|
|
|
|
|
2020-02-06 00:23:03 +00:00
|
|
|
render() {
|
2019-10-22 21:20:10 +01:00
|
|
|
const { intl: { formatMessage } } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className='footer-bar'>
|
|
|
|
<div className='footer-bar__container'>
|
|
|
|
{
|
|
|
|
links.map((link) =>
|
|
|
|
React.cloneElement(link, {
|
|
|
|
key: link.props.to,
|
|
|
|
'aria-label': formatMessage({
|
|
|
|
id: link.props['data-preview-title-id']
|
|
|
|
})
|
|
|
|
}))
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2020-03-10 21:24:43 +00:00
|
|
|
}
|