- more
This commit is contained in:
@@ -9,7 +9,7 @@ import EventListItem from '../components/Events/EventListItem.container.js';
|
||||
export default class Events extends Component {
|
||||
static get propTypes() {
|
||||
return {
|
||||
events: PropTypes.instanceOf(List),
|
||||
events: PropTypes.oneOfType([PropTypes.array, PropTypes.instanceOf(List)]),
|
||||
fetchEvents: PropTypes.func.isRequired,
|
||||
setActiveEvent: PropTypes.func.isRequired,
|
||||
};
|
||||
@@ -23,6 +23,7 @@ export default class Events extends Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this._renderEventListItem = this._renderEventListItem.bind(this);
|
||||
this._setActiveEvent = this.setActiveEvent.bind(this);
|
||||
}
|
||||
|
||||
@@ -32,9 +33,9 @@ export default class Events extends Component {
|
||||
|
||||
_keyExtractor = (event, index) => `${event.id}_${index}`;
|
||||
|
||||
_renderEventListItem = ({ event }) => (
|
||||
<EventListItem event={event} setActiveEvent={this.setActiveEvent} />
|
||||
);
|
||||
_renderEventListItem({ event }) {
|
||||
return <EventListItem event={event} setActiveEvent={this.setActiveEvent} />;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { events } = this.props;
|
||||
@@ -50,7 +51,7 @@ export default class Events extends Component {
|
||||
style={styles.eventList}
|
||||
/>
|
||||
) : (
|
||||
<ActivityIndicator animating={true} />
|
||||
<ActivityIndicator animating={true} size="large" />
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -7,7 +7,7 @@ import { FlatList, Text, View } from 'react-native';
|
||||
import { SORT_MODES, AUCTION_VIEW_MODES } from '../constants/constants.js';
|
||||
|
||||
import FilterBar from '../components/Auction/FilterBar.js';
|
||||
import AuctionListItem from '../containers/Auction/AuctionListItem.js';
|
||||
import AuctionListItem from '../components/Auction/AuctionListItem.container.js';
|
||||
|
||||
import styles from './Auction.styles.js';
|
||||
|
||||
|
||||
@@ -21,9 +21,10 @@ export default function Register({ doRegistration, navigation }) {
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.heading}>{title}</Text>
|
||||
<EditProfile
|
||||
cancelEditProfile={() => navigation.goBack()}
|
||||
cancelEditAction={() => navigation.goBack()}
|
||||
saveProfileAction={_doRegistration}
|
||||
saveProfileLabel="Register"
|
||||
showPasswordEntry
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user