- Linting... Prettier...

This commit is contained in:
2019-08-07 01:59:10 -04:00
parent 3dc8589fb4
commit 847c9b192a
102 changed files with 2161 additions and 2109 deletions

View File

@@ -1,43 +1,33 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
Text,
TouchableOpacity,
View,
} from 'react-native';
import { Text, TouchableOpacity, View } from 'react-native';
import styles from './EventTitle.styles.js';
export default function EventTitle({
action,
date,
end,
name,
start,
}) {
const _generateEventTitle = () => (
<View style={styles.eventInfo}>
<Text style={styles.eventName}>{name}</Text>
<Text style={styles.eventDate}>{`${date} | ${start} - ${end}`}</Text>
</View>
);
export default function EventTitle({ action, date, end, name, start }) {
const _generateEventTitle = () => (
<View style={styles.eventInfo}>
<Text style={styles.eventName}>{name}</Text>
<Text style={styles.eventDate}>{`${date} | ${start} - ${end}`}</Text>
</View>
);
if (action) {
return <TouchableOpacity onPress={action}>{_generateEventTitle()}</TouchableOpacity>;
}
if (action) {
return <TouchableOpacity onPress={action}>{_generateEventTitle()}</TouchableOpacity>;
}
return _generateEventTitle();
return _generateEventTitle();
}
EventTitle.propTypes = {
action: PropTypes.func,
date: PropTypes.string.isRequired,
end: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
start: PropTypes.string.isRequired,
action: PropTypes.func,
date: PropTypes.string.isRequired,
end: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
start: PropTypes.string.isRequired,
};
EventTitle.defaultProps = {
action: null,
action: null,
};