Skip to content

Commit

Permalink
Merge pull request #351 from newfold-labs/hotfix/react-warning
Browse files Browse the repository at this point in the history
Fix React Warning for `onKeyDown`
  • Loading branch information
arunshenoy99 authored Nov 1, 2023
2 parents 385f93e + 7f7af19 commit fd737a1
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions src/OnboardingSPA/components/LivePreview/SelectableCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,16 @@ const SelectableCard = ( {
className={ `${ className }` }
role="button"
tabIndex={ 0 }
onClick={
typeof onClick === 'function' &&
( () => {
if ( ! loadingParent ) {
onClick();
}
} )
}
onKeyDown={
typeof onClick === 'function' &&
( () => {
if ( ! loadingParent ) {
onClick();
}
} )
}
onClick={ () => {
if ( ! loadingParent && typeof onClick === 'function' ) {
onClick();
}
} }
onKeyDown={ () => {
if ( ! loadingParent && typeof onClick === 'function' ) {
onClick();
}
} }
>
<div className={ `${ className }__title-bar` }>
<div className={ `${ className }__title-bar__browser` }>
Expand Down

0 comments on commit fd737a1

Please sign in to comment.