fix: edit and launch button fail on keeping mouse over while reload (#36954)

## Description

> Fixes edit and launch buttons fail to appear if mouse pointer is
hovering over the Application box while loading webpage
> Tested it thoroughly.


https://github.com/user-attachments/assets/797df6c8-04b7-48af-ae87-51a89ad25e62




Fixes #36804  

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Updated mouse event handling in the Card component for improved
overlay display behavior.

- **Refactor**
- Adjusted event triggering from `onMouseEnter` to `onMouseOver` without
altering overall functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
pewpewXD 2024-10-18 01:52:58 +05:30 committed by GitHub
parent b122c8195f
commit e5e6989c0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -336,14 +336,14 @@ function Card({
className={testId}
hasReadPermission={hasReadPermission}
isContextMenuOpen={isContextMenuOpen}
onMouseEnter={() => {
!isFetching && setShowOverlay(true);
}}
onMouseLeave={() => {
// If the menu is not open, then setOverlay false
// Set overlay false on outside click.
!isContextMenuOpen && setShowOverlay(false);
}}
onMouseOver={() => {
!isFetching && setShowOverlay(true);
}}
showOverlay={showOverlay}
testId={testId}
>