Skip to content

Commit

Permalink
Merge branch 'master' into ij/update-templates-query
Browse files Browse the repository at this point in the history
  • Loading branch information
theianjones authored Sep 10, 2019
2 parents fade39b + 33d183d commit 3ddde64
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions packages/gatsby-theme-egghead-blog/src/components/Social.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,20 @@ const getConfig = ({ githubUrl, twitterUrl }) => {
),
},
}
switch (true) {
case Boolean(githubUrl):
return config.github
case Boolean(twitterUrl):
return config.twitter
default:
return {
to: '',
label: '',
Icon: () => null,
hidden: true,
}

if (Boolean(githubUrl)) {
return config.github
}

if (Boolean(twitterUrl)) {
return config.twitter
}

return {
to: '',
label: '',
Icon: () => null,
hidden: true,
}
}

Expand Down

0 comments on commit 3ddde64

Please sign in to comment.