From 841faabca720a0290247a62c568b9883bda09203 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Mon, 20 Jan 2025 11:22:23 -0500 Subject: [PATCH] refactor: use Icon instead of deprecated Octicon component (#1747) Signed-off-by: Adam Setch --- .../components/buttons/PillButton.tsx | 4 +- .../__snapshots__/PillButton.test.tsx.snap | 8 +- .../notifications/NotificationRow.tsx | 8 +- .../AccountNotifications.test.tsx.snap | 16 +-- .../NotificationFooter.test.tsx.snap | 40 +++--- .../NotificationRow.test.tsx.snap | 36 ++--- .../__snapshots__/Pills.test.tsx.snap | 136 +++++++++--------- src/renderer/components/primitives/Header.tsx | 4 +- .../__snapshots__/Header.test.tsx.snap | 4 +- src/renderer/routes/Settings.tsx | 2 +- .../__snapshots__/Accounts.test.tsx.snap | 6 +- .../__snapshots__/Filters.test.tsx.snap | 2 +- .../LoginWithOAuthApp.test.tsx.snap | 4 +- ...LoginWithPersonalAccessToken.test.tsx.snap | 4 +- .../__snapshots__/Settings.test.tsx.snap | 4 +- 15 files changed, 137 insertions(+), 141 deletions(-) diff --git a/src/renderer/components/buttons/PillButton.tsx b/src/renderer/components/buttons/PillButton.tsx index d9735c2e7..569ac6c3c 100644 --- a/src/renderer/components/buttons/PillButton.tsx +++ b/src/renderer/components/buttons/PillButton.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import type { Icon } from '@primer/octicons-react'; -import { Octicon, Stack, Text } from '@primer/react'; +import { Stack, Text } from '@primer/react'; import { type IconColor, Size } from '../../types'; @@ -21,7 +21,7 @@ export const PillButton: FC = (props: IPillButton) => { className="flex gap-1 items-center text-xxs px-1 m-0.5 rounded-full bg-gitify-pill-rest hover:bg-gitify-pill-hover" > - + {props.metric && {props.metric}} diff --git a/src/renderer/components/buttons/__snapshots__/PillButton.test.tsx.snap b/src/renderer/components/buttons/__snapshots__/PillButton.test.tsx.snap index c0017bb51..c12eda093 100644 --- a/src/renderer/components/buttons/__snapshots__/PillButton.test.tsx.snap +++ b/src/renderer/components/buttons/__snapshots__/PillButton.test.tsx.snap @@ -21,7 +21,7 @@ exports[`renderer/components/buttons/PillButton.tsx should render with metric 1` >
- +
diff --git a/src/renderer/components/notifications/__snapshots__/AccountNotifications.test.tsx.snap b/src/renderer/components/notifications/__snapshots__/AccountNotifications.test.tsx.snap index 2b3d69300..d72381d3d 100644 --- a/src/renderer/components/notifications/__snapshots__/AccountNotifications.test.tsx.snap +++ b/src/renderer/components/notifications/__snapshots__/AccountNotifications.test.tsx.snap @@ -762,7 +762,7 @@ exports[`renderer/components/notifications/AccountNotifications.tsx should rende >