From 03a12413d632a2a1613091e44c52ce46b4adc5b8 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Fri, 19 Apr 2024 09:02:56 +0530 Subject: Minor refactoring to move repeated code into utility class --- src/components/downloadManager/DownloadManagerLayout.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/downloadManager') diff --git a/src/components/downloadManager/DownloadManagerLayout.tsx b/src/components/downloadManager/DownloadManagerLayout.tsx index 43670355c..09a1b2096 100644 --- a/src/components/downloadManager/DownloadManagerLayout.tsx +++ b/src/components/downloadManager/DownloadManagerLayout.tsx @@ -10,7 +10,7 @@ import { import { mdiClose } from '@mdi/js'; import { Outlet } from 'react-router-dom'; import type { Actions } from '../../actions/lib/actions'; -import { isEscKeyPress } from '../../jsUtils'; +import { isEscapeKeyPress } from '../../jsUtils'; import Appear from '../ui/effects/Appear'; import Icon from '../ui/icon'; import ErrorBoundary from '../util/ErrorBoundary'; @@ -45,7 +45,7 @@ class DownloadManagerLayout extends Component { } handleKeyDown(e: KeyboardEvent) { - if (isEscKeyPress(e.key)) { + if (isEscapeKeyPress(e.key)) { this.props.actions!.ui.closeSettings(); } } -- cgit v1.2.3-70-g09d2