Fixed comment requirement

This commit is contained in:
Mustafa Buyukcelebi 2018-12-11 23:21:27 +03:00
parent 6c2e9a9f7c
commit d6f50d7447
4 changed files with 13 additions and 15 deletions

View File

@ -7,7 +7,7 @@ const TextWithIcon = ({
iconName, text, isClickable, onPress, iconStyle, iconType,
}) => (
<View style={styles.container}>
{(isClickable || onPress) && text ? (
{isClickable || onPress ? (
<TouchableHighlight underlayColor="transparent" onPress={() => onPress && onPress()}>
<View style={styles.wrapper}>
<Icon style={[styles.icon, iconStyle]} name={iconName} iconType={iconType} />
@ -15,12 +15,10 @@ const TextWithIcon = ({
</View>
</TouchableHighlight>
) : (
text && (
<View style={styles.wrapper}>
<Icon style={[styles.icon, iconStyle]} name={iconName} iconType={iconType} />
<Text style={styles.text}>{text}</Text>
</View>
)
<View style={styles.wrapper}>
<Icon style={[styles.icon, iconStyle]} name={iconName} iconType={iconType} />
<Text style={styles.text}>{text}</Text>
</View>
)}
</View>
);

View File

@ -1,4 +1,5 @@
import EStyleSheet from 'react-native-extended-stylesheet';
import { Platform } from 'react-native';
export default EStyleSheet.create({
container: {
@ -6,7 +7,7 @@ export default EStyleSheet.create({
width: '$deviceWidth',
backgroundColor: '$primaryBackgroundColor',
flex: 1,
maxHeight: 80,
maxHeight: Platform.OS === 'ios' ? 95 : 80,
},
containerReverse: {
justifyContent: 'space-between',

View File

@ -48,7 +48,6 @@ class ProfileSummaryView extends Component {
hoursVP,
intl,
isDarkTheme,
isFavorite,
isFollowing,
isLoggedIn,
isMuted,
@ -76,13 +75,13 @@ class ProfileSummaryView extends Component {
const isColumn = rowLength && DEVICE_WIDTH / rowLength <= 15;
const followButtonIcon = !isFollowing ? 'user-follow' : 'user-unfollow';
const ignoreButtonIcon = !isMuted ? 'ban' : 'minus';
return (
<Fragment>
<View style={[isColumn ? styles.textWithIconWrapperColumn : styles.textWithIconWrapper]}>
<TextWithIcon text={location} iconName="md-navigate" />
<TextWithIcon isClickable text={link} iconName="md-globe" />
<TextWithIcon text={date} iconName="md-calendar" />
{location && <TextWithIcon text={location} iconName="md-navigate" />}
{link && <TextWithIcon isClickable text={link} iconName="md-globe" />}
{date && <TextWithIcon text={date} iconName="md-calendar" />}
</View>
<View />
<Image

View File

@ -2,7 +2,7 @@ import EStyleSheet from 'react-native-extended-stylesheet';
export default EStyleSheet.create({
avatar: {
borderWidth: 1,
borderColor: '$white',
borderWidth: 0.75,
borderColor: '$borderColor',
},
});