mbsantiago / whombat

Audio Annotation Tool for ML development
https://mbsantiago.github.io/whombat/
GNU General Public License v3.0
30 stars 4 forks source link

Cannot find module useKeyFilter #25

Closed vogelbam closed 3 months ago

vogelbam commented 3 months ago

Description

In commit 1b34e93 useKeyFilter.ts was deleted, however, it seems like the KeyShortcut type is still needed.

What I Did

Building the docker image leads to the following error while running npm run build:

79.69 Failed to compile.
79.69 
79.69 ./src/hooks/annotation/useAnnotateClipKeyShortcuts.ts:3:34
79.69 Type error: Cannot find module '@/hooks/utils/useKeyFilter' or its corresponding type declarations.
79.69 
79.69   1 | import { useHotkeys } from "react-hotkeys-hook";
79.69   2 |
79.69 > 3 | import type { KeyShortcut } from "@/hooks/utils/useKeyFilter";
79.69     |                                  ^
79.69   4 |
79.69   5 | export const ANNOTATION_KEY_SHORTCUTS: KeyShortcut[] = [
79.69   6 |   {
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1

Had you planned to delete the whole file or shall we just bring it back?

mbsantiago commented 3 months ago

Hey @vogelbam,

I thought I had removed all references to this file. I adopted react-hotkeys as a dependency to manage this aspect of the app, as I thought it would be more robust.