nextui
nextui copied to clipboard
fix: remove disableAnimation prop from span element instead of img el…
Closes #
Im working on this linear issue: https://linear.app/nextui-inc/issue/ENG-1225/react-doesnt-recognize-disableanimation
📝 Description
[Cause of the error]
The error says we need to remove disableAnimation
prop from <span>
element.
Currently we are trying to remove this prop from <img>
element instead of <span>
. So, I removed those lines of codes.
The cause of this error is we did not extract disabledAnimation
prop in useAvatar
function's argument object de-structuring so that we accidentally passed disableAnimation
to <span>
element with otherProps
.
[Solution]
So, to avoid passing this prop to <span>
element(which means we shall avoid including disableAnimation
in otherProps
), we added the object de-structuring as a solution for this.
⛳️ Current behavior (updates)
the error message in console
🚀 New behavior
Working as fine.
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
Summary by CodeRabbit
-
Improvements
- Enhanced the handling of animation properties for better clarity and performance.
- Simplified the logic for managing the animation control within the avatar component, leading to improved maintainability.
- Filtered DOM properties to exclude unnecessary complexity, potentially improving overall performance.