1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
2018-08-09 23:24:58 +02:00

26 lines
548 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 ';
return (<span className={cls}>{readableCommunity}</span>);
}
}
export default connect(
(state) => ({
communities: state.config.bgp_communities,
})
)(Label);