From 0c2b93ff85da14fd396845450179de603e88e890 Mon Sep 17 00:00:00 2001 From: golles Date: Thu, 7 Jul 2022 22:42:10 +0200 Subject: [PATCH 1/3] Add social: Instagram --- README.md | 1 + gitprofile.config.js | 1 + src/components/GitProfile.jsx | 1 + src/components/details/index.jsx | 9 +++++++++ src/helpers/utils.jsx | 5 +++++ types/index.d.ts | 5 +++++ 6 files changed, 22 insertions(+) diff --git a/README.md b/README.md index cfc39b8..5058ea7 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ const config = { linkedin: '', twitter: '', facebook: '', + instagram: '', dribbble: '', behance: '', medium: '', diff --git a/gitprofile.config.js b/gitprofile.config.js index e05bf4d..0a3733f 100644 --- a/gitprofile.config.js +++ b/gitprofile.config.js @@ -14,6 +14,7 @@ const config = { linkedin: 'ariful-alam', twitter: 'arif_szn', facebook: '', + instagram: '', dribbble: '', behance: '', medium: '', diff --git a/src/components/GitProfile.jsx b/src/components/GitProfile.jsx index f6a968c..8771169 100644 --- a/src/components/GitProfile.jsx +++ b/src/components/GitProfile.jsx @@ -239,6 +239,7 @@ GitProfile.propTypes = { linkedin: PropTypes.string, twitter: PropTypes.string, facebook: PropTypes.string, + instagram: PropTypes.string, dribbble: PropTypes.string, behance: PropTypes.string, medium: PropTypes.string, diff --git a/src/components/details/index.jsx b/src/components/details/index.jsx index bd3c8f2..dfaae72 100644 --- a/src/components/details/index.jsx +++ b/src/components/details/index.jsx @@ -10,6 +10,7 @@ import { FaBuilding, FaDev, FaFacebook, + FaInstagram, FaGlobe, } from 'react-icons/fa'; import PropTypes from 'prop-types'; @@ -128,6 +129,14 @@ const Details = ({ profile, loading, social, github }) => { link={`https://www.facebook.com/${social.facebook}`} /> )} + {typeof social.instagram !== 'undefined' && social.instagram && ( + } + title="Instagram:" + value={social.instagram} + link={`https://www.instagram.com/${social.instagram}`} + /> + )} {typeof social.medium !== 'undefined' && social.medium && ( } diff --git a/src/helpers/utils.jsx b/src/helpers/utils.jsx index dae22ed..3517ecc 100644 --- a/src/helpers/utils.jsx +++ b/src/helpers/utils.jsx @@ -191,6 +191,11 @@ export const sanitizeConfig = (config) => { typeof config.social.facebook !== 'undefined' ? config.social.facebook : '', + instagram: + typeof config.social !== 'undefined' && + typeof config.social.instagram !== 'undefined' + ? config.social.instagram + : '', dribbble: typeof config.social !== 'undefined' && typeof config.social.dribbble !== 'undefined' diff --git a/types/index.d.ts b/types/index.d.ts index d1acbcc..9bb711f 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -54,6 +54,11 @@ export interface Social { */ facebook?: string; + /** + * Instagram + */ + instagram?: string; + /** * Dribbble */ From e16f50b3491c2356ff6ada829b5462a68072bca6 Mon Sep 17 00:00:00 2001 From: golles Date: Fri, 8 Jul 2022 17:41:25 +0200 Subject: [PATCH 2/3] Use better fitting icon Add new social to readme --- README.md | 2 +- src/components/details/index.jsx | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5058ea7..283d426 100644 --- a/README.md +++ b/README.md @@ -362,7 +362,7 @@ Your avatar and bio will be fetched from GitHub automatically. ### Social Links -You can link your social media services you're using, including LinkedIn, Twitter, Facebook, Dribbble, Behance, Medium, dev, personal website, phone and email. +You can link your social media services you're using, including LinkedIn, Twitter, Facebook, Instagram, Dribbble, Behance, Medium, dev, personal website, phone and email. ```js // gitprofile.config.js diff --git a/src/components/details/index.jsx b/src/components/details/index.jsx index dfaae72..bf99cab 100644 --- a/src/components/details/index.jsx +++ b/src/components/details/index.jsx @@ -1,5 +1,9 @@ import { MdLocationOn, MdMail } from 'react-icons/md'; -import { AiFillGithub, AiFillMediumSquare } from 'react-icons/ai'; +import { + AiFillGithub, + AiFillInstagram, + AiFillMediumSquare, +} from 'react-icons/ai'; import { SiTwitter } from 'react-icons/si'; import { GrLinkedinOption } from 'react-icons/gr'; import { CgDribbble } from 'react-icons/cg'; @@ -10,7 +14,6 @@ import { FaBuilding, FaDev, FaFacebook, - FaInstagram, FaGlobe, } from 'react-icons/fa'; import PropTypes from 'prop-types'; @@ -131,7 +134,7 @@ const Details = ({ profile, loading, social, github }) => { )} {typeof social.instagram !== 'undefined' && social.instagram && ( } + icon={} title="Instagram:" value={social.instagram} link={`https://www.instagram.com/${social.instagram}`} From a4b296172ede1b23b839165484262a97ef379a4f Mon Sep 17 00:00:00 2001 From: golles Date: Fri, 8 Jul 2022 19:46:39 +0200 Subject: [PATCH 3/3] Onther place where I missed the new isntagram config --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 283d426..65b5c41 100644 --- a/README.md +++ b/README.md @@ -372,6 +372,7 @@ module.exports = { linkedin: 'ariful-alam', twitter: 'arif_swozon', facebook: '', + instagram: '', dribbble: '', behance: '', medium: '',