fix(icons): Fix social icons not rendering
This commit is contained in:
committed by
mrugesh mohapatra
parent
69030797ac
commit
ab9b354504
@ -2,12 +2,14 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
import { Row, Col } from 'react-bootstrap';
|
||||||
|
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
|
||||||
import {
|
import {
|
||||||
Row,
|
faLinkedin,
|
||||||
Col
|
faGithub,
|
||||||
} from 'react-bootstrap';
|
faTwitter
|
||||||
import FontAwesome from '@fortawesome/react-fontawesome';
|
} from '@fortawesome/free-brands-svg-icons';
|
||||||
// see https://github.com/FortAwesome/react-fontawesome#external-loading
|
import { faLink } from '@fortawesome/free-solid-svg-icons';
|
||||||
|
|
||||||
import { userByNameSelector } from '../../../redux';
|
import { userByNameSelector } from '../../../redux';
|
||||||
|
|
||||||
@ -55,19 +57,19 @@ function mapDispatchToProps() {
|
|||||||
function LinkedInIcon(linkedIn) {
|
function LinkedInIcon(linkedIn) {
|
||||||
return (
|
return (
|
||||||
<a href={ linkedIn } rel='no-follow' target='_blank'>
|
<a href={ linkedIn } rel='no-follow' target='_blank'>
|
||||||
<FontAwesome
|
<FontAwesomeIcon
|
||||||
icon={['fab', 'linkedin']}
|
icon={faLinkedin}
|
||||||
size='2x'
|
size='2x'
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function githubIcon(ghURL) {
|
function GithubIcon(ghURL) {
|
||||||
return (
|
return (
|
||||||
<a href={ ghURL } rel='no-follow' target='_blank'>
|
<a href={ ghURL } rel='no-follow' target='_blank'>
|
||||||
<FontAwesome
|
<FontAwesomeIcon
|
||||||
icon={['fab', 'linkedin']}
|
icon={faGithub}
|
||||||
size='2x'
|
size='2x'
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
@ -77,8 +79,8 @@ function githubIcon(ghURL) {
|
|||||||
function WebsiteIcon(website) {
|
function WebsiteIcon(website) {
|
||||||
return (
|
return (
|
||||||
<a href={ website } rel='no-follow' target='_blank'>
|
<a href={ website } rel='no-follow' target='_blank'>
|
||||||
<FontAwesome
|
<FontAwesomeIcon
|
||||||
icon='link'
|
icon={faLink}
|
||||||
size='2x'
|
size='2x'
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
@ -88,8 +90,8 @@ function WebsiteIcon(website) {
|
|||||||
function TwitterIcon(handle) {
|
function TwitterIcon(handle) {
|
||||||
return (
|
return (
|
||||||
<a href={ handle } rel='no-follow' target='_blank' >
|
<a href={ handle } rel='no-follow' target='_blank' >
|
||||||
<FontAwesome
|
<FontAwesomeIcon
|
||||||
icon={['fab', 'twitter']}
|
icon={faTwitter}
|
||||||
size='2x'
|
size='2x'
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
@ -122,7 +124,7 @@ function SocialIcons(props) {
|
|||||||
isLinkedIn ? LinkedInIcon(linkedIn) : null
|
isLinkedIn ? LinkedInIcon(linkedIn) : null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
isGithub ? githubIcon(githubProfile) : null
|
isGithub ? GithubIcon(githubProfile) : null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
isWebsite ? WebsiteIcon(website) : null
|
isWebsite ? WebsiteIcon(website) : null
|
||||||
|
@ -52,7 +52,7 @@ export default function userServices() {
|
|||||||
..._.pick(user, userPropsForSession),
|
..._.pick(user, userPropsForSession),
|
||||||
isEmailVerified: !!user.emailVerified,
|
isEmailVerified: !!user.emailVerified,
|
||||||
isGithub: !!user.githubProfile,
|
isGithub: !!user.githubProfile,
|
||||||
isLinkedIn: !!user.linkedIn,
|
isLinkedIn: !!user.linkedin,
|
||||||
isTwitter: !!user.twitter,
|
isTwitter: !!user.twitter,
|
||||||
isWebsite: !!user.website,
|
isWebsite: !!user.website,
|
||||||
...normaliseUserFields(user)
|
...normaliseUserFields(user)
|
||||||
|
Reference in New Issue
Block a user