Skip to content

Commit bc348ea

Browse files
committed
[Dashboard] Replace Unity icon (#4814)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on replacing instances of the `SiUnity` icon from the `react-icons` library with a new custom `UnityIcon` component across multiple files in the dashboard application. ### Detailed summary - Added a new `UnityIcon` component in `UnityIcon.tsx`. - Replaced `SiUnity` with `UnityIcon` in: - `ConnectSDKCard.tsx` - `ConnectPlaygroundButton.tsx` - `CodeOptionButton.tsx` - `SupportedPlatformLink.tsx` - `CodeSegment.tsx` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 43a24e2 commit bc348ea

File tree

6 files changed

+28
-10
lines changed

6 files changed

+28
-10
lines changed

apps/dashboard/src/components/connect/ConnectPlaygroundButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Icon } from "@chakra-ui/react";
2-
import { SiUnity } from "@react-icons/all-files/si/SiUnity";
32
import { JavaScriptIcon } from "components/icons/brand-icons/JavaScriptIcon";
43
import { ReactIcon } from "components/icons/brand-icons/ReactIcon";
4+
import { UnityIcon } from "components/icons/brand-icons/UnityIcon";
55
import { useTrack } from "hooks/analytics/useTrack";
66
import type { Dispatch, ReactNode, SetStateAction } from "react";
77
import { Button } from "tw-components";
@@ -20,7 +20,7 @@ const LOGO_OPTIONS = {
2020
fill: "#61dafb",
2121
},
2222
unity: {
23-
icon: SiUnity,
23+
icon: UnityIcon,
2424
fill: "#ffffff",
2525
},
2626
} as const;

apps/dashboard/src/components/contract-tabs/code/CodeSegment.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { ButtonGroup, Flex, Icon, Stack } from "@chakra-ui/react";
2-
import { SiUnity } from "@react-icons/all-files/si/SiUnity";
32
import { JavaScriptIcon } from "components/icons/brand-icons/JavaScriptIcon";
43
import { ReactIcon } from "components/icons/brand-icons/ReactIcon";
54
import { TypeScriptIcon } from "components/icons/brand-icons/TypeScriptIcon";
5+
import { UnityIcon } from "components/icons/brand-icons/UnityIcon";
66
import { type Dispatch, type SetStateAction, useMemo } from "react";
77
import { Button, CodeBlock } from "tw-components";
88
import type { ComponentWithChildren } from "types/component-with-children";
@@ -40,7 +40,7 @@ const Environments: SupportedEnvironment[] = [
4040
{
4141
environment: "unity",
4242
title: "Unity",
43-
icon: SiUnity,
43+
icon: UnityIcon,
4444
colorScheme: "purple",
4545
},
4646
];
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 UnityIcon = (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>Unity</title>
15+
<path d="m12.9288 4.2939 3.7997 2.1929c.1366.077.1415.2905 0 .3675l-4.515 2.6076a.4192.4192 0 0 1-.4246 0L7.274 6.8543c-.139-.0745-.1415-.293 0-.3675l3.7972-2.193V0L1.3758 5.5977V16.793l3.7177-2.1456v-4.3858c-.0025-.1565.1813-.2682.318-.1838l4.5148 2.6076a.4252.4252 0 0 1 .2136.3676v5.2127c.0025.1565-.1813.2682-.3179.1838l-3.7996-2.1929-3.7178 2.1457L12 24l9.6954-5.5977-3.7178-2.1457-3.7996 2.1929c-.1341.082-.3229-.0248-.3179-.1838V13.053c0-.1565.087-.2956.2136-.3676l4.5149-2.6076c.134-.082.3228.0224.3179.1838v4.3858l3.7177 2.1456V5.5977L12.9288 0Z" />
16+
</svg>
17+
);
18+
};

apps/dashboard/src/components/product-pages/common/CodeOptionButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Icon } from "@chakra-ui/react";
2-
import { SiUnity } from "@react-icons/all-files/si/SiUnity";
32
import { JavaScriptIcon } from "components/icons/brand-icons/JavaScriptIcon";
43
import { ReactIcon } from "components/icons/brand-icons/ReactIcon";
4+
import { UnityIcon } from "components/icons/brand-icons/UnityIcon";
55
import { useTrack } from "hooks/analytics/useTrack";
66
import type { Dispatch, SetStateAction } from "react";
77
import { flushSync } from "react-dom";
@@ -21,7 +21,7 @@ export const LOGO_OPTIONS = {
2121
fill: "#61dafb",
2222
},
2323
unity: {
24-
icon: SiUnity,
24+
icon: UnityIcon,
2525
fill: "#ffffff",
2626
},
2727
} as const;

apps/dashboard/src/components/shared/ConnectSDKCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { SiUnity } from "@react-icons/all-files/si/SiUnity";
21
import { ReactIcon } from "components/icons/brand-icons/ReactIcon";
32
import { TypeScriptIcon } from "components/icons/brand-icons/TypeScriptIcon";
3+
import { UnityIcon } from "components/icons/brand-icons/UnityIcon";
44
import Link from "next/link";
55
import { SiUnrealengine } from "react-icons/si";
66
import { SiDotnet } from "react-icons/si";
@@ -36,7 +36,7 @@ export function ConnectSDKCard({
3636
/>
3737
<DocLink
3838
link="https://portal.thirdweb.com/unity/v4/getting-started"
39-
icon={SiUnity}
39+
icon={UnityIcon}
4040
label="Unity SDK"
4141
/>
4242
<DocLink

apps/dashboard/src/components/wallets/SupportedPlatformLink.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { TrackedLinkTW } from "@/components/ui/tracked-link";
22
import { cn } from "@/lib/utils";
3-
import { SiUnity } from "@react-icons/all-files/si/SiUnity";
43
import { ReactIcon } from "components/icons/brand-icons/ReactIcon";
54
import { TypeScriptIcon } from "components/icons/brand-icons/TypeScriptIcon";
5+
import { UnityIcon } from "components/icons/brand-icons/UnityIcon";
66

77
export function SupportedPlatformLink(props: {
88
platform: "React" | "React Native" | "Unity" | "TypeScript";
@@ -12,7 +12,7 @@ export function SupportedPlatformLink(props: {
1212
}) {
1313
let icon = ReactIcon;
1414
if (props.platform === "Unity") {
15-
icon = SiUnity;
15+
icon = UnityIcon;
1616
} else if (props.platform === "TypeScript") {
1717
icon = TypeScriptIcon;
1818
}

0 commit comments

Comments
 (0)