import React from 'react'; import PropTypes from 'prop-types'; import Zeroconf from 'react-native-zeroconf'; import { View, Text, SectionList, Button, StyleSheet } from 'react-native'; import realm from '../lib/realm'; import RocketChat from '../lib/rocketchat'; const styles = StyleSheet.create({ view: { flex: 1, flexDirection: 'column', justifyContent: 'center', alignItems: 'stretch' }, input: { height: 40, borderColor: '#aaa', margin: 20, padding: 5, borderWidth: 0, backgroundColor: '#f8f8f8' }, text: { textAlign: 'center', color: '#888' }, listItem: { lineHeight: 18, color: '#666', padding: 14 }, container: { flex: 1 }, separator: { height: 1, backgroundColor: '#eee' }, headerStyle: { backgroundColor: '#eee', lineHeight: 24, paddingLeft: 14, color: '#888' } }); const zeroconf = new Zeroconf(); export default class ListServerView extends React.Component { static propTypes = { navigation: PropTypes.object.isRequired } static navigationOptions = ({ navigation }) => ({ title: 'Servers', headerRight: (