Skip to content

Commit

Permalink
Fix React Warning for onKeyDown
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Nov 1, 2023
1 parent 531384a commit 7f7af19
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 7f7af19

Please sign in to comment.