From 66d680e2ec35aa1980e318c9b41f5ad4f1306d54 Mon Sep 17 00:00:00 2001 From: Ariful Alam Date: Wed, 30 Mar 2022 21:30:42 +0600 Subject: [PATCH] Rename dev.to --- README.md | 12 ++++++------ gitprofile.config.js | 6 +++--- src/components/GitProfile.jsx | 2 +- src/components/blog/index.jsx | 2 +- src/components/details/index.jsx | 6 +++--- src/helpers/utils.jsx | 6 +++--- types/index.d.ts | 6 +++--- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index c942809..18bcb7e 100644 --- a/README.md +++ b/README.md @@ -176,9 +176,9 @@ const config = { to: '2014', }, ], - // Display blog posts from your medium or dev.to account. (Optional) + // Display blog posts from your medium or dev account. (Optional) blog: { - source: 'dev.to', // medium | dev.to + source: 'dev', // medium | dev username: 'arifszn', limit: 5, // How many posts to display. Max is 10. }, @@ -336,7 +336,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.to, personal website, phone and email. +You can link your social media services you're using, including LinkedIn, Twitter, Facebook, Dribbble, Behance, Medium, dev, personal website, phone and email. ```js // gitprofile.config.js @@ -349,7 +349,7 @@ module.exports = { dribbble: '', behance: '', medium: '', - devto: '', + dev: '', website: 'https://arifszn.github.io', phone: '', email: '', @@ -447,14 +447,14 @@ module.exports = { ### Blog Posts -If you have [medium](https://medium.com) or [dev.to](https://dev.to) account, you can show your recent blog posts in here just by providing your medium/dev.to username. You can limit how many posts to display (Max is `10`). +If you have [medium](https://medium.com) or [dev](https://dev.to) account, you can show your recent blog posts in here just by providing your medium/dev username. You can limit how many posts to display (Max is `10`). ```js // gitprofile.config.js module.exports = { // ... blog: { - source: 'dev.to', + source: 'dev', username: 'arifszn', limit: 5, }, diff --git a/gitprofile.config.js b/gitprofile.config.js index ac6f801..7faad96 100644 --- a/gitprofile.config.js +++ b/gitprofile.config.js @@ -17,7 +17,7 @@ const config = { dribbble: '', behance: '', medium: '', - devto: 'arifszn', + dev: 'arifszn', website: 'https://arifszn.github.io', phone: '', email: 'arifulalamszn@gmail.com', @@ -76,9 +76,9 @@ const config = { to: '2012', }, ], - // Display blog posts from your medium or dev.to account. (Optional) + // Display blog posts from your medium or dev account. (Optional) blog: { - source: 'dev.to', // medium | dev.to + source: 'dev', // medium | dev username: 'arifszn', limit: 3, // How many posts to display. Max is 10. }, diff --git a/src/components/GitProfile.jsx b/src/components/GitProfile.jsx index 9c45cfc..b997664 100644 --- a/src/components/GitProfile.jsx +++ b/src/components/GitProfile.jsx @@ -238,7 +238,7 @@ GitProfile.propTypes = { dribbble: PropTypes.string, behance: PropTypes.string, medium: PropTypes.string, - devto: PropTypes.string, + dev: PropTypes.string, website: PropTypes.string, phone: PropTypes.string, email: PropTypes.string, diff --git a/src/components/blog/index.jsx b/src/components/blog/index.jsx index d55d8b7..a6ace04 100644 --- a/src/components/blog/index.jsx +++ b/src/components/blog/index.jsx @@ -30,7 +30,7 @@ const Blog = ({ loading, blog, googleAnalytics }) => { }).then((res) => { setArticles(res); }); - } else if (blog.source === 'dev.to') { + } else if (blog.source === 'dev') { getDevPost({ user: blog.username, }).then((res) => { diff --git a/src/components/details/index.jsx b/src/components/details/index.jsx index 6850ae8..22b4339 100644 --- a/src/components/details/index.jsx +++ b/src/components/details/index.jsx @@ -136,12 +136,12 @@ const Details = ({ profile, loading, social, github }) => { link={`https://medium.com/@${social.medium}`} /> )} - {typeof social.devto !== 'undefined' && social.devto && ( + {typeof social.dev !== 'undefined' && social.dev && ( } title="Dev:" - value={social.devto} - link={`https://dev.to/${social.devto}`} + value={social.dev} + link={`https://dev.to/${social.dev}`} /> )} {typeof social.website !== 'undefined' && social.website && ( diff --git a/src/helpers/utils.jsx b/src/helpers/utils.jsx index 79dc21a..dae22ed 100644 --- a/src/helpers/utils.jsx +++ b/src/helpers/utils.jsx @@ -206,10 +206,10 @@ export const sanitizeConfig = (config) => { typeof config.social.medium !== 'undefined' ? config.social.medium : '', - devto: + dev: typeof config.social !== 'undefined' && - typeof config.social.devto !== 'undefined' - ? config.social.devto + typeof config.social.dev !== 'undefined' + ? config.social.dev : '', website: typeof config.social !== 'undefined' && diff --git a/types/index.d.ts b/types/index.d.ts index d53024f..d1acbcc 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -70,9 +70,9 @@ export interface Social { medium?: string; /** - * dev.to + * dev */ - devto?: string; + dev?: string; /** * Website @@ -92,7 +92,7 @@ export interface Social { export interface Blog { /** - * medium | dev.to + * medium | dev */ source?: string;