Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/pages/SoftwarePage/components/icons/Brave.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { SVGProps } from "react";
const Brave = (props: SVGProps<SVGSVGElement>) => {
const clipPathId = uniqueId("clip-path-");

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🔴 Duplicate SVG gradient id 'fillPathId' generated once but used on two different elements

In Brave component, added a second uniqueId("fill-path-") call assigned to fillPathId2, applied it as the id of the second <linearGradient> element (the FF452A -> FF2000 gradient), and updated the third <path>'s fill attribute (previously url(#${fillPathId})) to reference url(#${fillPathId2}) so it correctly points to that gradient instead of colliding with the first one.

🤖 Prompt for AI agents
In frontend/pages/SoftwarePage/components/icons/Brave.tsx around line 6, review and complete this code-review fix: Duplicate SVG gradient id 'fillPathId' generated once but used on two different <linearGradient> elements.
What the draft fix changed: In `Brave` component, added a second `uniqueId("fill-path-")` call assigned to `fillPathId2`, applied it as the `id` of the second `<linearGradient>` element (the FF452A -> FF2000 gradient), and updated the third `<path>`'s `fill` attribute (previously `url(#${fillPathId})`) to reference `url(#${fillPathId2})` so it correctly points to that gradient instead of colliding with the first one.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 95 high — react 👍/👎 to teach the reviewer

const fillPathId = uniqueId("fill-path-");
const fillPathId2 = uniqueId("fill-path-");
return (
<svg fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<rect width="32" height="32" fill="white" />
Expand All @@ -23,7 +24,7 @@ const Brave = (props: SVGProps<SVGSVGElement>) => {
/>
<path
d="M22.0823 5.82772L19.8724 3.31738H15.9915H12.1106L9.90071 5.82772C9.90071 5.82772 7.96028 5.28804 7.04396 6.2055C7.04396 6.2055 9.6312 5.97166 10.5206 7.41979C10.5206 7.41979 12.9192 7.87852 13.2426 7.87852C13.566 7.87852 14.2667 7.60868 14.9135 7.3928C15.5603 7.17693 15.9915 7.17537 15.9915 7.17537C15.9915 7.17537 16.4227 7.17693 17.0695 7.3928C17.7163 7.60868 18.4171 7.87852 18.7405 7.87852C19.0639 7.87852 21.4625 7.41979 21.4625 7.41979C22.3518 5.97166 24.9391 6.2055 24.9391 6.2055C24.0228 5.28804 22.0823 5.82772 22.0823 5.82772Z"
fill={`url(#${fillPathId})`}
fill={`url(#${fillPathId2})`}
/>
</g>
<defs>
Expand All @@ -41,7 +42,7 @@ const Brave = (props: SVGProps<SVGSVGElement>) => {
<stop offset="1" stopColor="#FF2000" />
</linearGradient>
<linearGradient
id={fillPathId}
id={fillPathId2}
x1="45.4905"
y1="234.592"
x2="1796.55"
Expand Down