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

chore: update Twitter Icons to X Icons #794

Merged
merged 3 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions .husky/_/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"postcss": "^8.4.20",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.7.1",
"react-icons": "^4.12.0",
"react-toastify": "^9.1.1",
"sharp": "^0.31.3",
"tailwindcss": "^3.2.4",
Expand Down
7 changes: 4 additions & 3 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react"
import { FaDiscord, FaGithub, FaLinkedin, FaTwitter } from "react-icons/fa"
import { FaDiscord, FaGithub, FaLinkedin } from "react-icons/fa"
import { FaXTwitter } from "react-icons/fa6";

Check failure on line 3 in src/components/Footer.jsx

View workflow job for this annotation

GitHub Actions / Lint Before Release

Extra semicolon

Check failure on line 3 in src/components/Footer.jsx

View workflow job for this annotation

GitHub Actions / Lint Before Release

Extra semicolon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import statement for FaXTwitter seems to be importing from a non-standard path "react-icons/fa6". Verify that this is the correct path and that the FaXTwitter icon is indeed located there. If not, correct the import path to match the location of FaXTwitter in the react-icons package.

- import { FaXTwitter } from "react-icons/fa6";
+ import { FaXTwitter } from "react-icons/fa";

Commitable suggestion

[!IMPORTANT]
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
import { FaXTwitter } from "react-icons/fa6";
import { FaXTwitter } from "react-icons/fa";


function Footer() {
return (
Expand Down Expand Up @@ -39,10 +40,10 @@
target="_blank"
>
<span className="sr-only">
Twitter
X
Comment on lines 42 to +43
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The screen reader text "X" is not descriptive and does not convey the purpose of the link, which is not accessible. It should be updated to something more meaningful, like "Twitter Profile" to improve accessibility.

-             <span className="sr-only">
-               X
-             </span>
+             <span className="sr-only">
+               Twitter Profile
+             </span>

Commitable suggestion

[!IMPORTANT]
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
<span className="sr-only">
Twitter
X
<span className="sr-only">
Twitter Profile
</span>

</span>

<FaTwitter aria-hidden="true" />
<FaXTwitter aria-hidden="true" />
</a>

<a
Expand Down
4 changes: 2 additions & 2 deletions src/components/ProfileCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import {
FaBlog,
FaGithub,
FaTwitter,
FaYoutube,
FaTwitch,
FaLinkedin,
} from "react-icons/fa"
import { FaXTwitter } from "react-icons/fa6";

Check failure on line 9 in src/components/ProfileCard.jsx

View workflow job for this annotation

GitHub Actions / Lint Before Release

Extra semicolon

Check failure on line 9 in src/components/ProfileCard.jsx

View workflow job for this annotation

GitHub Actions / Lint Before Release

Extra semicolon
import SocialLink from "components/SocialLink"
import Image from "next/image"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import statements have been updated to include the new FaXTwitter icon from the react-icons/fa6 package. However, the import from react-icons/fa does not remove FaTwitter, which should be cleaned up if it's no longer used in the component to avoid importing unused icons.

- import { FaBlog, FaGithub, FaYoutube, FaTwitch, FaLinkedin, FaTwitter } from "react-icons/fa"
+ import { FaBlog, FaGithub, FaYoutube, FaTwitch, FaLinkedin } from "react-icons/fa"
+ import { FaXTwitter } from "react-icons/fa6";

Commitable suggestion

[!IMPORTANT]
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
import {
FaBlog,
FaGithub,
FaTwitter,
FaYoutube,
FaTwitch,
FaLinkedin,
} from "react-icons/fa"
import { FaXTwitter } from "react-icons/fa6";
import SocialLink from "components/SocialLink"
import Image from "next/image"
import {
FaBlog,
FaGithub,
FaYoutube,
FaTwitch,
FaLinkedin,
} from "react-icons/fa"
import { FaXTwitter } from "react-icons/fa6";
import SocialLink from "components/SocialLink"
import Image from "next/image"


Expand All @@ -17,7 +17,7 @@
},
twitter: {
url: "https://twitter.com/",
icon: FaTwitter,
icon: FaXTwitter,
},
blog: {
icon: FaBlog,
Expand Down
7 changes: 4 additions & 3 deletions src/data/homepage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FaDiscord, FaTwitter } from "react-icons/fa"
import { FaDiscord } from "react-icons/fa"
import { FaXTwitter } from "react-icons/fa6";

Check failure on line 2 in src/data/homepage.js

View workflow job for this annotation

GitHub Actions / Lint Before Release

Extra semicolon

Check failure on line 2 in src/data/homepage.js

View workflow job for this annotation

GitHub Actions / Lint Before Release

Extra semicolon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import statement for FaXTwitter seems to be importing from "react-icons/fa6" which might be a typo or incorrect module name. Typically, the react-icons package does not version its icon sets in this manner. The correct import should be from "react-icons/fa", unless the package structure has changed after my last update. Please verify the correct import path.

- import { FaXTwitter } from "react-icons/fa6";
+ import { FaXTwitter } from "react-icons/fa";

Commitable suggestion

[!IMPORTANT]
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
import { FaXTwitter } from "react-icons/fa6";
import { FaXTwitter } from "react-icons/fa";

import "react-toastify/dist/ReactToastify.css"

export const main = {
Expand Down Expand Up @@ -53,8 +54,8 @@
className="btn btn-twitter"
target="_blank" rel="noreferrer"
>
<FaTwitter />
X
<FaXTwitter />
X (Twitter)
</a>
),
}
Loading
Loading