1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
Matthias Hannig 46e07046eb fixed style
2018-09-06 15:47:02 +02:00

26 lines
568 B
JavaScript

import React from 'react'
import {connect} from 'react-redux'
class Label extends React.Component {
render() {
console.log(this.props.communities, this.props.community);
// Lookup communities
const readableCommunity = this.props.communities[this.props.community];
if (!readableCommunity) {
return null;
}
let cls = 'label label-success label-bgp-community ';
return (<span className={cls}>{readableCommunity}</span>);
}
}
export default connect(
(state) => ({
communities: state.config.bgp_communities,
})
)(Label);