diff --git a/app/components/UserIcon.js b/app/components/UserIcon.js index 22c1794..6f8db2d 100644 --- a/app/components/UserIcon.js +++ b/app/components/UserIcon.js @@ -1,56 +1,56 @@ import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import utils from '../utils'; import { Text, View } from 'react-native' import { Avatar} from 'react-native-paper'; import styles from '../assets/styles/blink/_Avatar.scss'; const UserIcon = (props) => { if (!props.identity) { return (null) } const name = props.identity.name || props.identity.uri; const photo = props.identity.photo; let initials = ''; if (name) { initials = name.split(' ', 2).map(x => x[0]).join(''); } const color = utils.generateMaterialColor(props.identity.uri)['300']; let avatarSize = props.size || 50; if (photo) { return ( ); } if (props.identity.uri && props.identity.uri.search('anonymous') !== -1) { return ( ); } if (props.identity.uri && props.identity.uri.search('videoconference') !== -1) { return ( ); } return ( ); }; UserIcon.propTypes = { identity: PropTypes.object.isRequired, large: PropTypes.bool, - size: PropTypes.bool + size: PropTypes.number }; export default UserIcon;