mirror of
https://github.com/alice-lg/alice-lg.git
synced 2024-05-11 05:55:03 +00:00
29 lines
670 B
React
29 lines
670 B
React
![]() |
|
||
|
import React from 'react'
|
||
|
import {connect} from 'react-redux'
|
||
|
|
||
|
/*
|
||
|
* Show current neighbour if selected
|
||
|
* This should help to create a breadcrumb style navigation
|
||
|
* in the header.
|
||
|
*/
|
||
|
class ProtocolName extends React.Component {
|
||
|
render() {
|
||
|
return (
|
||
|
<span className="status-protocol">
|
||
|
{this.props.protocol.description}
|
||
|
</span>
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default connect(
|
||
|
(state, props) => {
|
||
|
let rsProtocols = state.routeservers.protocols[props.routeserverId]||{};
|
||
|
let protocol = rsProtocols[props.protocolId]||{};
|
||
|
return {
|
||
|
protocol: protocol
|
||
|
};
|
||
|
}
|
||
|
)(ProtocolName);
|