Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add social: Instagram #88

Merged
merged 3 commits into from
Jul 9, 2022
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ const config = {
linkedin: '',
twitter: '',
facebook: '',
instagram: '',
golles marked this conversation as resolved.
Show resolved Hide resolved
dribbble: '',
behance: '',
medium: '',
Expand Down Expand Up @@ -361,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
Expand All @@ -371,6 +372,7 @@ module.exports = {
linkedin: 'ariful-alam',
twitter: 'arif_swozon',
facebook: '',
instagram: '',
dribbble: '',
behance: '',
medium: '',
Expand Down
1 change: 1 addition & 0 deletions gitprofile.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const config = {
linkedin: 'ariful-alam',
twitter: 'arif_szn',
facebook: '',
instagram: '',
dribbble: '',
behance: '',
medium: '',
Expand Down
1 change: 1 addition & 0 deletions src/components/GitProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
14 changes: 13 additions & 1 deletion src/components/details/index.jsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -128,6 +132,14 @@ const Details = ({ profile, loading, social, github }) => {
link={`https://www.facebook.com/${social.facebook}`}
/>
)}
{typeof social.instagram !== 'undefined' && social.instagram && (
<ListItem
icon={<AiFillInstagram className="mr-2" />}
title="Instagram:"
value={social.instagram}
link={`https://www.instagram.com/${social.instagram}`}
/>
)}
{typeof social.medium !== 'undefined' && social.medium && (
<ListItem
icon={<AiFillMediumSquare className="mr-2" />}
Expand Down
5 changes: 5 additions & 0 deletions src/helpers/utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 5 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export interface Social {
*/
facebook?: string;

/**
* Instagram
*/
instagram?: string;

/**
* Dribbble
*/
Expand Down