import React, { Component } from 'react';
import { View } from 'react-native';
import { StackNavigator, NavigationActions } from 'react-navigation';
import { connect } from 'react-redux';
import ListHouContent from './houseinfo/listhouse';
import Empty from '../empty';
import ErJiScreen from './houseinfo/erJiScreen';

class HouseList extends Component {
  action = () => {
    this.props.dispatch(NavigationActions.navigate({
      routeName: 'ERJi',
    }));
  };

  render() {
    return (
      <View style={{ flex: 1 }}>
        <ListHouContent navigation={this.props.navigation} />
      </View>
    );
  }
}
HouseList.router = ListHouContent.router;// 暂时加上，等下看看去掉会不会出错
const fwInfo = StackNavigator(
  {
    HouseList: { screen: connect()(HouseList) },
    ERJi: { screen: ErJiScreen },
    SanJiInfo: { screen: Empty('fangWuDetail', 'QuanLiRenScreen') },
  },
  {
    headerMode: 'none',
    navigationOptions: {
      gesturesEnabled: false,
    },
  },
);
export default fwInfo;
