- Cleanup
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Text, View } from 'react-native';
|
||||
|
||||
import styles from './Event.styles.js';
|
||||
@@ -6,10 +7,10 @@ import styles from './Event.styles.js';
|
||||
export default class Event extends Component {
|
||||
static get propTypes() {
|
||||
return {
|
||||
description: PropTypes.string.isRequired,
|
||||
endTime: PropTypes.string.isRequired,
|
||||
fetchEvent: PropTypes.func.isRequired,
|
||||
id: PropTypes.string.isRequired,
|
||||
description: PropTypes.string,
|
||||
endTime: PropTypes.string,
|
||||
fetchEvents: PropTypes.func,
|
||||
id: PropTypes.string,
|
||||
images: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
url: PropTypes.string,
|
||||
@@ -18,27 +19,27 @@ export default class Event extends Component {
|
||||
isTicketed: PropTypes.bool,
|
||||
posts: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
author: PropTypes.string.isRequired,
|
||||
content: PropTypes.string.isRequired,
|
||||
id: PropTypes.string.isRequired,
|
||||
author: PropTypes.string,
|
||||
content: PropTypes.string,
|
||||
id: PropTypes.string,
|
||||
isPublic: PropTypes.bool,
|
||||
scheduledPost: PropTypes.bool,
|
||||
sendNotification: PropTypes.bool,
|
||||
timestamp: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
timestamp: PropTypes.string,
|
||||
title: PropTypes.string,
|
||||
}),
|
||||
),
|
||||
requireLoginToSeeAuction: PropTypes.bool.isRequired,
|
||||
showFrom: PropTypes.string.isRequired,
|
||||
showUntil: PropTypes.string.isRequired,
|
||||
startTime: PropTypes.string.isRequired,
|
||||
requireLoginToSeeAuction: PropTypes.bool,
|
||||
showFrom: PropTypes.string,
|
||||
showUntil: PropTypes.string,
|
||||
startTime: PropTypes.string,
|
||||
tagline: PropTypes.string,
|
||||
ticketClasses: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
|
||||
}),
|
||||
)
|
||||
title: PropTypes.string.isRequired,
|
||||
),
|
||||
title: PropTypes.string,
|
||||
url: PropTypes.string,
|
||||
};
|
||||
}
|
||||
@@ -59,6 +60,10 @@ export default class Event extends Component {
|
||||
super(props);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.props.fetchEvents();
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
description,
|
||||
|
||||
Reference in New Issue
Block a user