Skip to content

Commit

Permalink
fix(card): remove unnecessary state hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
davidicus committed Nov 4, 2020
1 parent e7ccab2 commit 450f9b4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/Card/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ const CardWrapper = ({
...others
}) => {
const validOthers = filterValidAttributes(others);
const [isCardSelected, setIsCardSelected] = useState(false);
useEffect(() => {
setIsCardSelected(isSelected);
}, [isSelected, setIsCardSelected]);

return (
<div
Expand All @@ -75,7 +71,7 @@ const CardWrapper = ({
onBlur={onBlur}
tabIndex={tabIndex}
className={classnames(className, `${iotPrefix}--card--wrapper`, {
[`${iotPrefix}--card--wrapper__selected`]: isCardSelected,
[`${iotPrefix}--card--wrapper__selected`]: isSelected,
})}
{...validOthers}>
{children}
Expand Down

0 comments on commit 450f9b4

Please sign in to comment.