This commit is contained in:
Mike Fitzpatrick
2019-08-12 17:44:01 -04:00
parent 0f618fdd78
commit f0460a1b76
21 changed files with 432 additions and 78 deletions

View File

@@ -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>
);

View File

@@ -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';

View File

@@ -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>
);