import React, { PropTypes } from 'react' import { connect } from 'react-redux' import { Link } from 'react-router' import { createStore, bindActionCreators } from 'redux' import FontAwesome from 'react-fontawesome' import * as pusherActions from '../services/pusher/actions' class PusherConnectionList extends React.Component{ constructor(props) { super(props); } componentDidMount(){ if( this.props.connected ){ this.props.pusherActions.getConnectionList(); } } componentWillReceiveProps(newProps){ if( !this.props.connected && newProps.connected ){ this.props.pusherActions.getConnectionList(); } } render(){ if( !this.props.connected ) return null; if( typeof(this.props.connections) == 'undefined' || this.props.connections.length <= 0 ) return null; return (