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-");
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>

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.

🦩 🟠 Brave icon reuses the same uniqueId-generated variable name for two distinct linearGradient defs, causing duplicate 'id' attributes in the DOM

In frontend/pages/SoftwarePage/components/icons/Brave.tsx, added a second uniqueId("fill-path-") call assigned to a new fillPathId2 variable. The second <linearGradient> in <defs> now uses id={fillPathId2} instead of reusing fillPathId, and the third <path> element (which referenced the second gradient) now uses fill={url(#${fillPathId2})} so it correctly points at its own gradient definition, eliminating the duplicate id attribute.

🤖 Prompt for AI agents
In frontend/pages/SoftwarePage/components/icons/Brave.tsx around line 29, review and complete this code-review fix: Brave icon reuses the same uniqueId-generated variable name for two distinct linearGradient defs, causing duplicate 'id' attributes in the DOM.
What the draft fix changed: In `frontend/pages/SoftwarePage/components/icons/Brave.tsx`, added a second `uniqueId("fill-path-")` call assigned to a new `fillPathId2` variable. The second `<linearGradient>` in `<defs>` now uses `id={fillPathId2}` instead of reusing `fillPathId`, and the third `<path>` element (which referenced the second gradient) now uses `fill={`url(#${fillPathId2})`}` so it correctly points at its own gradient definition, eliminating the duplicate `id` attribute.
Verify the change is correct and complete; do not refactor unrelated code.

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

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