- Linting... Prettier...
This commit is contained in:
@@ -5,7 +5,10 @@ import { getProfileAvatarUrl } from '../../../selectors/profile.js';
|
||||
import UserProfileButton from './UserProfileButton.js';
|
||||
|
||||
const matchStateToProps = (state) => ({
|
||||
avatarUrl: getProfileAvatarUrl(state),
|
||||
avatarUrl: getProfileAvatarUrl(state),
|
||||
});
|
||||
|
||||
export default connect(matchStateToProps, null)(UserProfileButton);
|
||||
export default connect(
|
||||
matchStateToProps,
|
||||
null,
|
||||
)(UserProfileButton);
|
||||
|
||||
@@ -7,29 +7,28 @@ import { Icon } from 'react-native-elements';
|
||||
import styles from './UserProfileButton.styles.js';
|
||||
|
||||
export default function UserProfileButton({ avatarUrl, navigation }) {
|
||||
const _goToProfile = () => {
|
||||
navigation.navigate('Profile');
|
||||
return false;
|
||||
};
|
||||
|
||||
const _goToProfile = () => {
|
||||
navigation.navigate('Profile');
|
||||
return false;
|
||||
};
|
||||
|
||||
return (
|
||||
<TouchableOpacity onPress={_goToProfile}>
|
||||
{avatarUrl !== null ? (
|
||||
<View style={styles.avatarWrap}>
|
||||
<Image source={{ uri: avatarUrl }} />
|
||||
</View>
|
||||
) : (
|
||||
<Icon name="ei-user" type="evilicons" size={28} />
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
);
|
||||
return (
|
||||
<TouchableOpacity onPress={_goToProfile}>
|
||||
{avatarUrl !== null ? (
|
||||
<View style={styles.avatarWrap}>
|
||||
<Image source={{ uri: avatarUrl }} />
|
||||
</View>
|
||||
) : (
|
||||
<Icon name="ei-user" type="evilicons" size={28} />
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
UserProfileButton.propTypes = {
|
||||
avatarUrl: PropTypes.string,
|
||||
avatarUrl: PropTypes.string,
|
||||
};
|
||||
|
||||
UserProfileButton.propTypes = {
|
||||
avatarUrl: null,
|
||||
avatarUrl: null,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user