fix: prevent console errors for read only badges in card actions #76
+31
−33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Console errors were occuring because badges (which are read only) were being passed to the
CardHeader
via theactions
prop. This was triggering the console warning in the Card component.To prevent this, I avoided the usage of the
actions
prop. And passed the badges to a div with a hardcoded class and a flex layout to bypass the logic in the card component throwing the error.admittedly, this is a bandaid and allows the catalog view to avoid this error without requiring a change to the logic of the card component.