import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';

const Avatar = ({ className, user }) => (
  <div className={cx('Avatar', className)}>
    <img
      className="Avatar-image"
      src={user.avatar || `/a/${encodeURIComponent(user._id)}`}
      alt={user.username}
    />
  </div>
);

Avatar.propTypes = {
  className: PropTypes.string,
  user: PropTypes.object.isRequired
};

export default Avatar;

import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';

const Avatar = ({ className, user }) => (
  <div className={cx('Avatar', className)}>
    <img
      className="Avatar-image"
      src={user.avatar || `https://sigil.cupcake.io/uwave-${encodeURIComponent(user._id)}`}
      alt={user.username}
    />
  </div>
);

Avatar.propTypes = {
  className: PropTypes.string,
  user: PropTypes.object.isRequired
};

export default Avatar;

Revert "[WLK-INSTANCE] use locally generated avatars as default instead of cupcake.io"
Revert "[WLK-INSTANCE] use locally generated avatars as default instead of cupcake.io"

This reverts commit 92c531beca630b1aff75712360a3bae3e158420e.
