fix(sidebar): don't show nulled profiles

This commit is contained in:
Evan Morikawa 2016-03-10 18:32:22 -05:00
parent 04492c06c7
commit 69d1b10508
2 changed files with 4 additions and 4 deletions

View file

@ -45,15 +45,15 @@ module.exports = class ClearbitDataSource
_socialProfiles: (person={}) ->
profiles = {}
if person.twitter
if (person.twitter?.handle ? "").length > 0
profiles.twitter =
handle: person.twitter.handle
url: "https://twitter.com/#{person.twitter.handle}"
if person.facebook
if (person.facebook?.handle ? "").length > 0
profiles.facebook =
handle: person.facebook.handle
url: "https://facebook.com/#{person.facebook.handle}"
if person.linkedin
if (person.linkedin?.handle ? "").length > 0
profiles.linkedin =
handle: person.linkedin.handle
url: "https://linkedin.com/#{person.linkedin.handle}"

View file

@ -95,7 +95,7 @@ export default class SidebarParticipantProfile extends React.Component {
const profiles = _.map(this.state.socialProfiles, (profile, type) => {
const linkFn = () => {shell.openExternal(profile.url)}
return (
<a className="social-profile-item" onClick={linkFn} key={type}>
<a className="social-profile-item" onClick={linkFn} key={type} title={profile.url}>
<RetinaImg url={`nylas://participant-profile/assets/${type}-sidebar-icon@2x.png`}
mode={RetinaImg.Mode.ContentPreserve} />
</a>