content: // @flow
  import React, { Component } from 'react';
  import type { RedisConnection } from '../../utils/Types';
  
  export default class Connections extends Component {
  
    props: {
      connections: Array<RedisConnection>,
      selectedConnection: ?RedisConnection,
      handleConnectionSelect: (RedisConnection) => void
    };
  
    render() {
      return (
        <nav className="nav-group">
          <h5 className="nav-group-title">
            Connections
          </h5>
          { this.props.connections.map(connection =>
            <a key={connection.id} className={`${connection === this.props.selectedConnection ? 'active' : ''} nav-group-item`} onClick={this.props.handleConnectionSelect.bind(this, connection)}>
              {connection.name}
            </a>
          )}
        </nav>
      );
    }
  }
  