diff --git a/desktop/src/services/watch.ts b/desktop/src/services/watch.ts index 3505be744..59ef842f7 100644 --- a/desktop/src/services/watch.ts +++ b/desktop/src/services/watch.ts @@ -2,7 +2,6 @@ import type { FSWatcher } from "chokidar"; import ElectronLog from "electron-log"; import { watchStore } from "../stores/watch.store"; import { WatchMapping, WatchStoreType } from "../types/ipc"; -import { isMappingPresent } from "../utils/watch"; export const addWatchMapping = async ( watcher: FSWatcher, @@ -29,6 +28,13 @@ export const addWatchMapping = async ( setWatchMappings(watchMappings); }; +function isMappingPresent(watchMappings: WatchMapping[], folderPath: string) { + const watchMapping = watchMappings?.find( + (mapping) => mapping.folderPath === folderPath, + ); + return !!watchMapping; +} + export const removeWatchMapping = async ( watcher: FSWatcher, folderPath: string, diff --git a/desktop/src/utils/watch.ts b/desktop/src/utils/watch.ts deleted file mode 100644 index b5bf13029..000000000 --- a/desktop/src/utils/watch.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { WatchMapping } from "../types/ipc"; - -export function isMappingPresent( - watchMappings: WatchMapping[], - folderPath: string, -) { - const watchMapping = watchMappings?.find( - (mapping) => mapping.folderPath === folderPath, - ); - return !!watchMapping; -}