Skip to content

Commit

Permalink
Renaming ENTER_KEY const
Browse files Browse the repository at this point in the history
  • Loading branch information
Galpittel committed Mar 14, 2024
1 parent fa0509f commit 29010c0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { GalleryUI } from '../../item/media/GalleryUI';

import TextItem from '../../item/textItem.js';

const ENTER_KEY = 'Enter'

Check failure on line 7 in packages/gallery/src/components/gallery/proGallery/navigationPanel.js

View workflow job for this annotation

GitHub Actions / lint (16.13.0)

Insert `;`

class NavigationPanel extends React.Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -33,7 +35,6 @@ class NavigationPanel extends React.Component {
activeIndexOffsetMemory: this.activeIndexOffsetMemory,
prevActiveIndex: this.prevActiveIndex,
});
const enterKey = 'Enter';

this.prevActiveIndex = activeIndex;
this.activeIndexOffsetMemory = activeIndexOffsetMemory;
Expand Down Expand Up @@ -98,7 +99,7 @@ class NavigationPanel extends React.Component {
onClick={() => this.scrollToThumbnail(idx)}
tabIndex={0}
onKeyDown={(e) => {
if (e.key === enterKey) {
if (e.key === ENTER_KEY) {
this.scrollToThumbnail(idx);
}
}}
Expand Down

0 comments on commit 29010c0

Please sign in to comment.