Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/projectMembers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TC_API_URL, PROJECTS_API_URL, CONNECT_MESSAGE_API_URL } from '../config
export function getMembersById (userIds) {
const _userIdArr = _.map(userIds, _id => `userId:${_id}`)
// only requesting certain member attributes
const fields = 'userId,handle,photoURL,firstName,lastName,maxRating,details,email'
const fields = 'userId,handle,photoURL,firstName,lastName,details,email'
const query = _userIdArr.join(' OR ')
const url = `${TC_API_URL}/v3/members/_search/?fields=`
+ encodeURIComponent(fields)
Expand Down
36 changes: 0 additions & 36 deletions src/components/User/UserAvatar.jsx

This file was deleted.

11 changes: 6 additions & 5 deletions src/components/User/UserWithName.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import React from 'react'
import PropTypes from 'prop-types'
import { DOMAIN } from '../../config/constants'
import UserAvatar from './UserAvatar'
import { Avatar } from 'appirio-tech-react-components'
require('./UserWithName.scss')

const UserWithName = ({ handle, firstName, lastName, photoURL, maxRating={rating: 0}, showLevel=false }) => {
const UserWithName = ({ handle, firstName, lastName, photoURL }) => {
const url = `//www.${DOMAIN}/members/${handle}/`
return (
<div className="user-block">
<a href={url} target="_blank" rel="noopener noreferrer" className="photo">
<UserAvatar rating={maxRating.rating} showLevel={showLevel} photoURL={photoURL} />
<Avatar
avatarUrl={photoURL}
userName={firstName + ' ' + lastName}
/>
</a>
<span className="txt-box">
<a href={url} target="_blank" rel="noopener noreferrer" className="link-black">{firstName} {lastName}</a>
Expand All @@ -24,8 +27,6 @@ UserWithName.propTypes = {
firstName : PropTypes.string.isRequired,
lastName : PropTypes.string.isRequired,
photoURL : PropTypes.string,
maxRating : PropTypes.object,
showLevel : PropTypes.bool
}

export default UserWithName