2016-08-19 13:57:50 +02:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* LeftMenu
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import styles from './styles.css';
|
2016-08-19 14:04:08 +02:00
|
|
|
import { Link } from 'react-router';
|
2016-08-19 13:57:50 +02:00
|
|
|
|
|
|
|
export class LeftMenu extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
|
|
render() {
|
2016-08-19 14:04:08 +02:00
|
|
|
const links = this.props.plugins.map(plugin => <li><Link to={`/${plugin.id}`}>{plugin.name}</Link></li>);
|
2016-08-19 13:57:50 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<p>Links</p>
|
|
|
|
<ul className={styles.leftMenu}>
|
|
|
|
{links}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LeftMenu.propTypes = {
|
|
|
|
plugins: React.PropTypes.object,
|
|
|
|
};
|
|
|
|
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
|
|
return {
|
|
|
|
dispatch,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect(mapDispatchToProps)(LeftMenu);
|