bito-code-review[bot] commented on code in PR #37708:
URL: https://github.com/apache/superset/pull/37708#discussion_r2788937114
##########
superset-frontend/src/explore/components/SaveModal.tsx:
##########
@@ -33,11 +33,12 @@ import {
Input,
Loading,
Divider,
+ Flex,
TreeSelect,
} from '@superset-ui/core/components';
import { t, logging } from '@apache-superset/core';
import { DatasourceType, isDefined, SupersetClient } from '@superset-ui/core';
-import { css, styled, Alert } from '@apache-superset/core/ui';
+import { css, styled, useTheme, Alert } from '@apache-superset/core/ui';
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Invalid hook usage in class component</b></div>
<div id="fix">
Using the useTheme hook in a class component violates React rules, as hooks
can only be called in functional components or custom hooks. This will cause a
runtime error when the component renders. The component should be converted to
a functional component or use withTheme HOC instead.
</div>
</div>
<details>
<summary><b>Citations</b></summary>
<ul>
<li>
Rule Violated: <a
href="https://github.com/apache/superset/blob/be92d41/AGENTS.md#L79">AGENTS.md:79</a>
</li>
<li>
Rule Violated: <a
href="https://github.com/apache/superset/blob/be92d41/.cursor/rules/dev-standard.mdc#L36">dev-standard.mdc:36</a>
</li>
</ul>
</details>
<small><i>Code Review Run #2ad484</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]