pleroma/app/soapbox/features/public_layout/components/footer.js

44 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-04-25 15:26:47 -07:00
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
2020-04-25 15:26:47 -07:00
import ImmutablePureComponent from 'react-immutable-pure-component';
import { Link } from 'react-router-dom';
import { List as ImmutableList } from 'immutable';
2020-04-25 15:26:47 -07:00
const mapStateToProps = (state, props) => ({
copyright: state.getIn(['soapbox', 'copyright']),
navlinks: state.getIn(['soapbox', 'navlinks', 'homeFooter'], ImmutableList()),
});
export default @connect(mapStateToProps)
class Footer extends ImmutablePureComponent {
static propTypes = {
copyright: PropTypes.string,
navlinks: ImmutablePropTypes.list,
}
2020-04-25 15:26:47 -07:00
render() {
const { copyright, navlinks } = this.props;
2020-04-25 15:26:47 -07:00
return (
<div className='footer'>
<div className='footer-container'>
<div className='copyright'>
<span>{copyright}</span>
2020-04-25 15:26:47 -07:00
</div>
<ul>
{navlinks.map((link, i) => (
<li key={i}>
<Link to={link.get('url')}>{link.get('title')}</Link>
</li>
))}
2020-04-25 15:26:47 -07:00
</ul>
</div>
</div>
);
}
}