diff --git a/spot-client/src/common/app-state/config/default-config.js b/spot-client/src/common/app-state/config/default-config.js index 37b349cf0..6288fefad 100644 --- a/spot-client/src/common/app-state/config/default-config.js +++ b/spot-client/src/common/app-state/config/default-config.js @@ -43,15 +43,6 @@ export default { PUSH_NOTIFICATIONS_ENABLED: process.env.CALENDAR_PUSH_NOTIFICATIONS_ENABLED === 'true' }, - /** - * The avatar image to display in the meetings list when a participant of - * the meeting has no gravatar configured. - * - * @type {string} - */ - DEFAULT_AVATAR_URL: process.env.DEFAULT_AVATAR_URL - || `https://${DEFAULT_DOMAIN}/images/avatar.png`, - /** * The app background image to display. By default a solid color is * displayed as the background. diff --git a/spot-client/src/common/app-state/config/selectors.js b/spot-client/src/common/app-state/config/selectors.js index 95e133b77..9a8f26396 100644 --- a/spot-client/src/common/app-state/config/selectors.js +++ b/spot-client/src/common/app-state/config/selectors.js @@ -52,17 +52,6 @@ export function getCalendarConfig(state) { return state.config.CALENDARS; } -/** -* A selector which returns the configured default avatar URL to display for -* people without avatar URLs. -* -* @param {Object} state - The Redux state. -* @returns {string} -*/ -export function getDefaultAvatarUrl(state) { - return state.config.DEFAULT_AVATAR_URL; -} - /** * A selector which returns which Jitsi-Meet deployment domain to direct * meetings to which do not specify a domain. diff --git a/spot-client/src/common/ui/components/scheduled-meetings/avatar.js b/spot-client/src/common/ui/components/scheduled-meetings/avatar.js deleted file mode 100644 index ae3fb9977..000000000 --- a/spot-client/src/common/ui/components/scheduled-meetings/avatar.js +++ /dev/null @@ -1,59 +0,0 @@ - -import { getDefaultAvatarUrl } from 'common/app-state'; -import { hash } from 'common/utils'; -import PropTypes from 'prop-types'; -import React from 'react'; -import { connect } from 'react-redux'; - - -/** - * A component that displays the gravatar of a provided email or a configured - * default avatar. - */ -export class Avatar extends React.Component { - static defaultProps = { - email: '' - }; - - static propTypes = { - defaultAvatarUrl: PropTypes.string, - email: PropTypes.string - }; - - /** - * Implements React's {@link Component#render()}. - * - * @inheritdoc - * @returns {ReactElement} - */ - render() { - const { defaultAvatarUrl, email } = this.props; - - const avatarUrl = email - ? `https://www.gravatar.com/avatar/${ - hash(email.trim().toLowerCase())}?d=wavatar` - : defaultAvatarUrl; - - return ( - - ); - } -} - -/** - * Selects parts of the Redux state to pass in with the props of {@code Avatar}. - * - * @param {Object} state - The Redux state. - * @private - * @returns {Object} - */ -function mapStateToProps(state) { - return { - defaultAvatarUrl: getDefaultAvatarUrl(state) - }; -} - -export default connect(mapStateToProps)(Avatar); diff --git a/spot-client/src/common/ui/components/scheduled-meetings/scheduled-meeting.js b/spot-client/src/common/ui/components/scheduled-meetings/scheduled-meeting.js index b4d69251d..199709d2a 100644 --- a/spot-client/src/common/ui/components/scheduled-meetings/scheduled-meeting.js +++ b/spot-client/src/common/ui/components/scheduled-meetings/scheduled-meeting.js @@ -6,7 +6,6 @@ import { withTranslation } from 'react-i18next'; import { Button } from './../button'; -import Avatar from './avatar'; /** * Displays details about a meeting and response to clicks. @@ -78,23 +77,6 @@ export class ScheduledMeeting extends React.Component { ); } - /** - * Creates a React Element for each meeting participant for displaying that - * participant's avatar. - * - * @param {Array} participants - The event participants to display - * as avatars. - * @private - * @returns {Array} - */ - _generateAvatars(participants = []) { - return participants.map(participant => ( - - )); - } - /** * Returns the calendar date for the meeting. *