Skip to content

Commit

Permalink
feat(contributors): add Twitter icons (#111)
Browse files Browse the repository at this point in the history
* fix: twitter icons

* feat(contributors): add Twitter icons

---------

Co-authored-by: VanY <[email protected]>
  • Loading branch information
valens200 and VanY authored Feb 23, 2024
1 parent 0b39b58 commit 6b03757
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 6 deletions.
15 changes: 15 additions & 0 deletions components/Contributors/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useContext, useEffect, useState } from 'react';
import { Zoom } from 'react-awesome-reveal';
import themeContext from '../../context/defaultTheme';
import ContributorFilter from './ContributorFilter';
import { FaMastodon, FaXTwitter } from 'react-icons/fa6';

function Contributors({ contributors }) {
const [showMorePositions, setShowMorePositions] = useState([]);
Expand Down Expand Up @@ -153,6 +154,20 @@ function Contributors({ contributors }) {
) : (
<></>
)}
{contributor.x ? (
<a href={contributor.x}>
<FaXTwitter />
</a>
) : (
<></>
)}
{contributor.mastodon ? (
<a href={contributor.mastodon}>
<FaMastodon />
</a>
) : (
<></>
)}
{contributor.linkedin ? (
<a href={contributor.linkedin}>
<ion-icon name="logo-linkedin"></ion-icon>
Expand Down
47 changes: 45 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"dependencies": {
"@emotion/react": "^11.11.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@notionhq/client": "^0.4.2",
"axios": "^0.22.0",
"dayjs": "^1.10.7",
Expand All @@ -25,6 +26,7 @@
"react-awesome-reveal": "^4.2.5",
"react-content-loader": "^6.0.3",
"react-dom": "18.2.0",
"react-icons": "^5.0.1",
"react-text-transition": "^3.1.0",
"react-tiny-popover": "^7.0.1",
"react-twitter-embed": "^4.0.4",
Expand Down
6 changes: 6 additions & 0 deletions utils/contributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ const getContributors = async () => {
github: result.properties.Github.rich_text[0]
? result.properties.Github.rich_text[0].text.content
: '',
x: result.properties.Twitter.rich_text[0]
? result.properties.Twitter.rich_text[0].text.content
: '',
mastodon: result.properties.Mastodon.rich_text[0]
? result.properties.Mastodon.rich_text[0].text.content
: '',
orcid: result.properties.Orcid.rich_text[0]
? result.properties.Orcid.rich_text[0].text.content
: '',
Expand Down
32 changes: 28 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,25 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"

"@fortawesome/[email protected]":
version "6.5.1"
resolved "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.5.1.tgz"
integrity sha512-GkWzv+L6d2bI5f/Vk6ikJ9xtl7dfXtoRu3YGE6nq0p/FFqA1ebMOAWg3XgRyb0I6LYyYkiAo+3/KrwuBp8xG7A==

"@fortawesome/fontawesome-svg-core@~1 || ~6":
version "6.5.1"
resolved "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.5.1.tgz"
integrity sha512-MfRCYlQPXoLlpem+egxjfkEuP9UQswTrlCOsknus/NcMoblTH2g0jPrapbcIb04KGA7E2GZxbAccGZfWoYgsrQ==
dependencies:
"@fortawesome/fontawesome-common-types" "6.5.1"

"@fortawesome/react-fontawesome@^0.2.0":
version "0.2.0"
resolved "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.2.0.tgz"
integrity sha512-uHg75Rb/XORTtVt7OS9WoK8uM276Ufi7gCzshVWkUJbHhh3svsUUeqXerrM96Wm7fRiDzfKRwSoahhMIkGAYHw==
dependencies:
prop-types "^15.8.1"

"@humanwhocodes/config-array@^0.5.0":
version "0.5.0"
resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz"
Expand All @@ -185,10 +204,10 @@
dependencies:
glob "7.1.7"

"@next/swc-darwin-arm64@13.4.19":
"@next/swc-darwin-x64@13.4.19":
version "13.4.19"
resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.19.tgz"
integrity sha512-vv1qrjXeGbuF2mOkhkdxMDtv9np7W4mcBtaDnHU+yJG+bBwa6rYsYSCI/9Xm5+TuF5SbZbrWO6G1NfTh1TMjvQ==
resolved "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.19.tgz"
integrity sha512-jyzO6wwYhx6F+7gD8ddZfuqO4TtpJdw3wyOduR4fxTUCm3aLw7YmHGYNjS0xRSYGAkLpBkH1E0RcelyId6lNsw==

"@nodelib/[email protected]":
version "2.1.5"
Expand Down Expand Up @@ -2585,6 +2604,11 @@ react-content-loader@^6.0.3:
loose-envify "^1.1.0"
scheduler "^0.23.0"

react-icons@^5.0.1:
version "5.0.1"
resolved "https://registry.npmjs.org/react-icons/-/react-icons-5.0.1.tgz"
integrity sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==

react-intersection-observer@^9.4.3:
version "9.5.2"
resolved "https://registry.npmjs.org/react-intersection-observer/-/react-intersection-observer-9.5.2.tgz"
Expand Down Expand Up @@ -2619,7 +2643,7 @@ react-twitter-embed@^4.0.4:
dependencies:
scriptjs "^2.5.9"

"react@^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", react@^18.2.0, "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", react@>=16.0.0, react@>=16.14.0, react@>=16.8.0, react@>=18.0.0, [email protected]:
react@*, "react@^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.0.0 || ^17.0.0 || ^18.0.0", "react@^16.8.0 || ^17.0.0 || ^18.0.0", react@^18.2.0, "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", react@>=16.0.0, react@>=16.14.0, react@>=16.3, react@>=16.8.0, react@>=18.0.0, [email protected]:
version "18.2.0"
resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz"
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
Expand Down

0 comments on commit 6b03757

Please sign in to comment.