mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 20:00:25 +00:00
Allow linking Stack Overflow account/profile #226
This commit is contained in:
@@ -19,6 +19,7 @@ const config = {
|
|||||||
behance: '',
|
behance: '',
|
||||||
medium: 'arifszn',
|
medium: 'arifszn',
|
||||||
dev: 'arifszn',
|
dev: 'arifszn',
|
||||||
|
stackoverflow: '', // format: userid/username
|
||||||
website: 'https://arifszn.github.io',
|
website: 'https://arifszn.github.io',
|
||||||
phone: '',
|
phone: '',
|
||||||
email: 'arifulalamszn@gmail.com',
|
email: 'arifulalamszn@gmail.com',
|
||||||
|
|||||||
@@ -258,6 +258,7 @@ GitProfile.propTypes = {
|
|||||||
behance: PropTypes.string,
|
behance: PropTypes.string,
|
||||||
medium: PropTypes.string,
|
medium: PropTypes.string,
|
||||||
dev: PropTypes.string,
|
dev: PropTypes.string,
|
||||||
|
stackoverflow: PropTypes.string,
|
||||||
website: PropTypes.string,
|
website: PropTypes.string,
|
||||||
phone: PropTypes.string,
|
phone: PropTypes.string,
|
||||||
email: PropTypes.string,
|
email: PropTypes.string,
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import {
|
|||||||
FaDev,
|
FaDev,
|
||||||
FaFacebook,
|
FaFacebook,
|
||||||
FaGlobe,
|
FaGlobe,
|
||||||
|
FaStackOverflow,
|
||||||
} from 'react-icons/fa';
|
} from 'react-icons/fa';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { skeleton } from '../../helpers/utils';
|
import { skeleton } from '../../helpers/utils';
|
||||||
@@ -169,6 +170,14 @@ const Details = ({ profile, loading, social, github }) => {
|
|||||||
link={`https://dev.to/${social.dev}`}
|
link={`https://dev.to/${social.dev}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{social?.stackoverflow && (
|
||||||
|
<ListItem
|
||||||
|
icon={<FaStackOverflow className="mr-2" />}
|
||||||
|
title="Stack Overflow:"
|
||||||
|
value={social.stackoverflow.split('/').slice(-1)}
|
||||||
|
link={`https://stackoverflow.com/users/${social.stackoverflow}`}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{social?.website && (
|
{social?.website && (
|
||||||
<ListItem
|
<ListItem
|
||||||
icon={<FaGlobe className="mr-2" />}
|
icon={<FaGlobe className="mr-2" />}
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ export const sanitizeConfig = (config) => {
|
|||||||
behance: config?.social?.behance,
|
behance: config?.social?.behance,
|
||||||
medium: config?.social?.medium,
|
medium: config?.social?.medium,
|
||||||
dev: config?.social?.dev,
|
dev: config?.social?.dev,
|
||||||
|
stackoverflow: config?.social?.stackoverflow,
|
||||||
website: config?.social?.website,
|
website: config?.social?.website,
|
||||||
phone: config?.social?.phone,
|
phone: config?.social?.phone,
|
||||||
email: config?.social?.email,
|
email: config?.social?.email,
|
||||||
|
|||||||
5
types/index.d.ts
vendored
5
types/index.d.ts
vendored
@@ -79,6 +79,11 @@ export interface Social {
|
|||||||
*/
|
*/
|
||||||
dev?: string;
|
dev?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stack Overflow
|
||||||
|
*/
|
||||||
|
stackoverflow?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Website
|
* Website
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user