- Reorg andf cleanup. Maintainability.
This commit is contained in:
@@ -2,9 +2,9 @@ import { List } from 'immutable';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { FlatList, StyleSheet, View } from 'react-native';
|
||||
import { ActivityIndicator, FlatList, StyleSheet, View } from 'react-native';
|
||||
|
||||
import EventListItem from '../containers/Events/EventListItem.js';
|
||||
import EventListItem from '../components/Events/EventListItem.container.js';
|
||||
|
||||
export default class Events extends Component {
|
||||
static get propTypes() {
|
||||
@@ -41,7 +41,7 @@ export default class Events extends Component {
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{events.size > 0 && (
|
||||
{events.size > 0 ? (
|
||||
<FlatList
|
||||
data={events}
|
||||
keyExtractor={this._keyExtractor}
|
||||
@@ -49,6 +49,8 @@ export default class Events extends Component {
|
||||
contentContainerStyle={styles.eventListContentContainer}
|
||||
style={styles.eventList}
|
||||
/>
|
||||
) : (
|
||||
<ActivityIndicator animating={true} />
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user