fix(MAJORLEA-006): Logo.tsx imports MUI SvgIcon instead of using @flamingo/ui-kit for brand/product icons - #80
Conversation
…mingo/ui-kit for brand/product icons
| @@ -1,9 +1,8 @@ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
🦩 🟠 Logo.tsx imports MUI SvgIcon instead of using @flamingo/ui-kit for brand/product icons
Replaced the SvgIcon/local SVG approach with MlgLogo from @flamingo/ui-kit/components/icons as directed by MAJORLEA-006. Removed imports of SvgIcon, SvgIconProps from @mui/material and LogoSvg from ../assets/logo.svg. The Logo wrapper now forwards its ref and props to MlgLogo. Risks: (a) the exact sub-path @flamingo/ui-kit/components/icons is assumed from the suggested fix — the actual package export path may differ (e.g. @flamingo/ui-kit or @flamingo/ui-kit/icons); (b) MlgLogo may not accept a forwarded SVGSVGElement ref, so the ref type is inferred via React.ComponentProps<typeof MlgLogo> rather than hard-coded — if MlgLogo does not support ref forwarding at all this will need adjustment; (c) @flamingo/ui-kit must be listed as a dependency in package.json (not visible here). A reviewer should verify the correct import path and ref compatibility before merging.
🤖 Prompt for AI agents
In frontend/src/components/Logo.tsx around line 1, review and complete this code-review fix: Logo.tsx imports MUI SvgIcon instead of using @flamingo/ui-kit for brand/product icons.
What the draft fix changed: Replaced the `SvgIcon`/local SVG approach with `MlgLogo` from `@flamingo/ui-kit/components/icons` as directed by MAJORLEA-006. Removed imports of `SvgIcon`, `SvgIconProps` from `@mui/material` and `LogoSvg` from `../assets/logo.svg`. The `Logo` wrapper now forwards its ref and props to `MlgLogo`. Risks: (a) the exact sub-path `@flamingo/ui-kit/components/icons` is assumed from the suggested fix — the actual package export path may differ (e.g. `@flamingo/ui-kit` or `@flamingo/ui-kit/icons`); (b) `MlgLogo` may not accept a forwarded `SVGSVGElement` ref, so the ref type is inferred via `React.ComponentProps<typeof MlgLogo>` rather than hard-coded — if `MlgLogo` does not support `ref` forwarding at all this will need adjustment; (c) `@flamingo/ui-kit` must be listed as a dependency in `package.json` (not visible here). A reviewer should verify the correct import path and ref compatibility before merging.
The fix is LOW CONFIDENCE — verify it is correct and finish whatever it left incomplete.
fix confidence: 🔴 52 low — review closely — react 👍/👎 to teach the reviewer
Closes findings from rule MAJORLEA-006 — Logo.tsx imports MUI SvgIcon instead of using @flamingo/ui-kit for brand/product icons.
Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.
frontend/src/components/Logo.tsx:1What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.
Run: https://product-hub.flamingo.so/admin/code-review
Run id:
8f1c6ef6-6b61-4dcd-bb0e-59bc6a7d37e8Merging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.