Skip to content

Commit ffcd199

Browse files
committed
[Dashboard] Replace twitter icon (#4817)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces a new `XIcon` component and replaces existing Twitter icons in various components with this new icon, enhancing consistency and potentially improving the visual design. ### Detailed summary - Added a new `XIcon` component in `XIcon.tsx`. - Replaced `SiTwitter` icon with `XIcon` in: - `edit-profile.tsx` - `socialLinks.tsx` - `PublisherSocials.tsx` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent b1d78b1 commit ffcd199

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

apps/dashboard/src/components/contract-components/publisher/PublisherSocials.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { SiLinkedin } from "@react-icons/all-files/si/SiLinkedin";
44
import { SiMedium } from "@react-icons/all-files/si/SiMedium";
55
import { SiReddit } from "@react-icons/all-files/si/SiReddit";
66
import { SiTelegram } from "@react-icons/all-files/si/SiTelegram";
7-
import { SiTwitter } from "@react-icons/all-files/si/SiTwitter";
87
import { DiscordIcon } from "components/icons/brand-icons/DiscordIcon";
98
import { GithubIcon } from "components/icons/brand-icons/GithubIcon";
9+
import { XIcon } from "components/icons/brand-icons/XIcon";
1010
import type { ProfileMetadata } from "constants/schemas";
1111
import { FiGlobe } from "react-icons/fi";
1212
import { LinkButton, TrackedIconButton } from "tw-components";
@@ -37,7 +37,7 @@ export const PublisherSocials: React.FC<PublisherSocialsProps> = ({
3737
}
3838
bg="transparent"
3939
aria-label="twitter"
40-
icon={<Icon as={SiTwitter} />}
40+
icon={<XIcon className="size-4" />}
4141
category={TRACKING_CATEGORY}
4242
label="twitter"
4343
/>

apps/dashboard/src/components/contract-components/publisher/edit-profile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import {
99
Textarea,
1010
useDisclosure,
1111
} from "@chakra-ui/react";
12-
import { SiTwitter } from "@react-icons/all-files/si/SiTwitter";
1312
import { useQueryClient } from "@tanstack/react-query";
1413
import { DiscordIcon } from "components/icons/brand-icons/DiscordIcon";
1514
import { GithubIcon } from "components/icons/brand-icons/GithubIcon";
15+
import { XIcon } from "components/icons/brand-icons/XIcon";
1616
import { FileInput } from "components/shared/FileInput";
1717
import {
1818
DASHBOARD_ENGINE_RELAYER_URL,
@@ -227,7 +227,7 @@ export const EditProfile: React.FC<EditProfileProps> = ({
227227
<FormControl isInvalid={!!errors.twitter}>
228228
<FormLabel>
229229
<div className="flex flex-row gap-2">
230-
<Icon as={SiTwitter} boxSize={4} />
230+
<XIcon className="size-4" />
231231
Twitter
232232
</div>
233233
</FormLabel>

apps/dashboard/src/components/footer/socialLinks.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { SiInstagram } from "@react-icons/all-files/si/SiInstagram";
22
import { SiLinkedin } from "@react-icons/all-files/si/SiLinkedin";
33
import { SiTiktok } from "@react-icons/all-files/si/SiTiktok";
4-
import { SiTwitter } from "@react-icons/all-files/si/SiTwitter";
54
import { SiYoutube } from "@react-icons/all-files/si/SiYoutube";
65
import { DiscordIcon } from "components/icons/brand-icons/DiscordIcon";
76
import { GithubIcon } from "components/icons/brand-icons/GithubIcon";
7+
import { XIcon } from "components/icons/brand-icons/XIcon";
88

99
interface socialLinkInfo {
1010
link: string;
@@ -18,7 +18,7 @@ const socialIconSize = "1.25rem";
1818
export const SOCIALS: socialLinkInfo[] = [
1919
{
2020
link: "https://twitter.com/thirdweb",
21-
icon: <SiTwitter fontSize={socialIconSize} />,
21+
icon: <XIcon fontSize={socialIconSize} className="size-5" />,
2222
ariaLabel: "Twitter",
2323
},
2424
{
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { SVGProps } from "react";
2+
3+
export const XIcon = (props: SVGProps<SVGSVGElement>) => {
4+
return (
5+
<svg
6+
role="img"
7+
viewBox="0 0 24 24"
8+
xmlns="http://www.w3.org/2000/svg"
9+
fill="currentColor"
10+
width={24}
11+
height={24}
12+
{...props}
13+
>
14+
<title>X</title>
15+
<path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z" />
16+
</svg>
17+
);
18+
};

0 commit comments

Comments
 (0)