Skip to content

Commit b1d78b1

Browse files
committed
[Dashboard] Replace Discord icon (#4816)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on replacing the usage of the `SiDiscord` icon from `@react-icons/all-files` with a custom `DiscordIcon` component in multiple files, enhancing the icon's integration and potentially improving styling consistency. ### Detailed summary - Replaced `SiDiscord` icon with `DiscordIcon` in: - `edit-profile.tsx` - `socialLinks.tsx` - `PublisherSocials.tsx` - Introduced `DiscordIcon` component in `DiscordIcon.tsx` with an SVG representation. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent bc348ea commit b1d78b1

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
@@ -1,11 +1,11 @@
11
import { ButtonGroup, type ButtonGroupProps, Icon } from "@chakra-ui/react";
2-
import { SiDiscord } from "@react-icons/all-files/si/SiDiscord";
32
import { SiFacebook } from "@react-icons/all-files/si/SiFacebook";
43
import { SiLinkedin } from "@react-icons/all-files/si/SiLinkedin";
54
import { SiMedium } from "@react-icons/all-files/si/SiMedium";
65
import { SiReddit } from "@react-icons/all-files/si/SiReddit";
76
import { SiTelegram } from "@react-icons/all-files/si/SiTelegram";
87
import { SiTwitter } from "@react-icons/all-files/si/SiTwitter";
8+
import { DiscordIcon } from "components/icons/brand-icons/DiscordIcon";
99
import { GithubIcon } from "components/icons/brand-icons/GithubIcon";
1010
import type { ProfileMetadata } from "constants/schemas";
1111
import { FiGlobe } from "react-icons/fi";
@@ -50,7 +50,7 @@ export const PublisherSocials: React.FC<PublisherSocialsProps> = ({
5050
href={publisherProfile.discord}
5151
bg="transparent"
5252
aria-label="discord"
53-
icon={<Icon as={SiDiscord} />}
53+
icon={<DiscordIcon className="size-4" />}
5454
category={TRACKING_CATEGORY}
5555
label="discord"
5656
/>

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,9 +9,9 @@ import {
99
Textarea,
1010
useDisclosure,
1111
} from "@chakra-ui/react";
12-
import { SiDiscord } from "@react-icons/all-files/si/SiDiscord";
1312
import { SiTwitter } from "@react-icons/all-files/si/SiTwitter";
1413
import { useQueryClient } from "@tanstack/react-query";
14+
import { DiscordIcon } from "components/icons/brand-icons/DiscordIcon";
1515
import { GithubIcon } from "components/icons/brand-icons/GithubIcon";
1616
import { FileInput } from "components/shared/FileInput";
1717
import {
@@ -253,7 +253,7 @@ export const EditProfile: React.FC<EditProfileProps> = ({
253253
<FormControl isInvalid={!!errors.discord}>
254254
<FormLabel>
255255
<div className="flex flex-row gap-2">
256-
<Icon as={SiDiscord} boxSize={4} />
256+
<DiscordIcon className="size-4" />
257257
Discord
258258
</div>
259259
</FormLabel>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { SiDiscord } from "@react-icons/all-files/si/SiDiscord";
21
import { SiInstagram } from "@react-icons/all-files/si/SiInstagram";
32
import { SiLinkedin } from "@react-icons/all-files/si/SiLinkedin";
43
import { SiTiktok } from "@react-icons/all-files/si/SiTiktok";
54
import { SiTwitter } from "@react-icons/all-files/si/SiTwitter";
65
import { SiYoutube } from "@react-icons/all-files/si/SiYoutube";
6+
import { DiscordIcon } from "components/icons/brand-icons/DiscordIcon";
77
import { GithubIcon } from "components/icons/brand-icons/GithubIcon";
88

99
interface socialLinkInfo {
@@ -22,7 +22,7 @@ export const SOCIALS: socialLinkInfo[] = [
2222
ariaLabel: "Twitter",
2323
},
2424
{
25-
icon: <SiDiscord fontSize={socialIconSize} />,
25+
icon: <DiscordIcon className="size-5" />,
2626
ariaLabel: "Discord",
2727
label: "discord",
2828
link: "https://discord.gg/thirdweb",
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 DiscordIcon = (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>Discord</title>
15+
<path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />
16+
</svg>
17+
);
18+
};

0 commit comments

Comments
 (0)