/**
 * 朋友列表
 */
import React, { Component } from 'react';
import { connect } from 'dva';
import tim from '../../../utils/im/imInitialize';
import './im.less';
export default class ConversationList extends Component {
  constructor(props) {
    super(props);
    this.state = {
      visible: props.visible
    };
  }

  componentDidMount() {
    this.getFriendList();
  }
  componentWillReceiveProps(nextProps) {
    this.setState({
      visible: nextProps.visible
    });
  }
  getFriendList() {
    // tim.getFriendList().then(({ data: friendList }) => {
    //   //   this.$store.commit('upadteFriendList', friendList)
    // });
  }
  render() {
    return (
      <div
        className="friend-list-container"
        style={{ display: this.state.visible ? 'block' : 'none' }}
      >
        {/* <div :class="{'default': !hasFriend}"> */}
        {/* <div v-if="hasFriend">
      <friend-item v-for="friend in friendList" :key="friend.userID" :friend="friend" />
    </div>
    
  </div> */}
        <div style={{ color: 'gray' }}>暂无好友</div>
      </div>
    );
  }
}
