Skip to content

Commit 52aeed4

Browse files
authored
refactor: fix sonar lint feedback (svg/img, filter) (#2283)
refactor: sonar lint feedback (svg/img, filter) Signed-off-by: Adam Setch <[email protected]>
1 parent 44ba6ae commit 52aeed4

File tree

9 files changed

+25
-25
lines changed

9 files changed

+25
-25
lines changed

src/renderer/components/__snapshots__/Sidebar.test.tsx.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/renderer/components/icons/LogoIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ export const LogoIcon: FC<ILogoIcon> = ({
2424
...props
2525
}: ILogoIcon) => (
2626
<svg
27+
aria-hidden="true"
2728
aria-label={`${APPLICATION.NAME} Logo`}
2829
className={cn(
2930
size === Size.SMALL && 'size-2.5',
3031
size === Size.MEDIUM && 'size-5',
3132
size === Size.LARGE && 'size-8',
3233
)}
3334
onClick={() => onClick?.()}
34-
role="img"
3535
viewBox="0 0 500 500"
3636
xmlns="https://www.w3.org/2000/svg"
3737
xmlnsXlink="https://www.w3.org/1999/xlink"

src/renderer/components/icons/VolumeDownIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import type { FC } from 'react';
22

33
export const VolumeDownIcon: FC = () => (
44
<svg
5+
aria-hidden="true"
56
aria-label="Volume Down Icon"
67
className="size-2"
78
fill="currentColor"
89
height="24"
9-
role="img"
1010
viewBox="0 0 24 24"
1111
width="24"
1212
xmlns="http://www.w3.org/2000/svg"

src/renderer/components/icons/VolumeUpIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import type { FC } from 'react';
22

33
export const VolumeUpIcon: FC = () => (
44
<svg
5+
aria-hidden="true"
56
aria-label="Volume Up Icon"
67
className="size-2"
78
fill="currentColor"
89
height="24"
9-
role="img"
1010
viewBox="0 0 24 24"
1111
width="24"
1212
xmlns="http://www.w3.org/2000/svg"

src/renderer/components/icons/__snapshots__/LogoIcon.test.tsx.snap

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/renderer/components/layout/__snapshots__/AppLayout.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/renderer/routes/__snapshots__/Login.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/renderer/routes/__snapshots__/Settings.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/renderer/utils/api/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ export async function getLatestDiscussion(
268268
try {
269269
const response = await searchDiscussions(notification);
270270
return (
271-
response.data?.data.search.nodes.filter(
271+
response.data?.data.search.nodes.find(
272272
(discussion) => discussion.title === notification.subject.title,
273-
)[0] ?? null
273+
) ?? null
274274
);
275275
} catch (err) {
276276
rendererLogError(

0 commit comments

Comments
 (0)