mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 18:47:51 +08:00
fix(sidebar): don't show nulled profiles
This commit is contained in:
parent
04492c06c7
commit
69d1b10508
2 changed files with 4 additions and 4 deletions
|
@ -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}"
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue