korbit-ai[bot] commented on code in PR #33213:
URL: https://github.com/apache/superset/pull/33213#discussion_r2054961271
##########
superset-frontend/src/features/home/RightMenu.tsx:
##########
@@ -327,7 +327,7 @@ const RightMenu = ({
) : (
<Menu.Item key={item.name} css={styledChildMenu}>
{item.url ? (
- <a href={ensureAppRoot(item.url)}> {item.label} </a>
+ <a href={sanitizeAndEnsureAppRoot(item.url)}> {item.label} </a>
Review Comment:
### Missing function import <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The code is using 'sanitizeAndEnsureAppRoot' function which is not imported
or defined in the file.
###### Why this matters
This will cause a runtime error as the function is undefined, breaking the
menu functionality when users try to click on menu items with URLs.
###### Suggested change ∙ *Feature Preview*
Import the sanitizeAndEnsureAppRoot function at the top of the file with
other imports:
```typescript
import { ensureAppRoot, sanitizeAndEnsureAppRoot } from
'src/utils/pathUtils';
```
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/bed46cb1-aacd-45e4-a22d-135acdac610c/upvote)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/bed46cb1-aacd-45e4-a22d-135acdac610c?what_not_true=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/bed46cb1-aacd-45e4-a22d-135acdac610c?what_out_of_scope=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/bed46cb1-aacd-45e4-a22d-135acdac610c?what_not_in_standard=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/bed46cb1-aacd-45e4-a22d-135acdac610c)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:83635226-0248-403f-a05f-a09662ac453a -->
[](83635226-0248-403f-a05f-a09662ac453a)
--
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]