fix functions

This commit is contained in:
Rushikesh Tote 2022-06-04 11:04:50 +05:30
parent c11e9d4878
commit e85c16accb
2 changed files with 5 additions and 5 deletions

View file

@ -12,7 +12,7 @@ function WatchModal({ watchModalView, setWatchModalView }) {
useEffect(() => { useEffect(() => {
if (shouldUpdateMappings) { if (shouldUpdateMappings) {
setMappings(watchService.ElectronAPIs.getWatchMappings()); setMappings(watchService.getWatchMappings());
setShouldUpdateMappings(false); setShouldUpdateMappings(false);
} }
}, [shouldUpdateMappings]); }, [shouldUpdateMappings]);

View file

@ -105,12 +105,12 @@ class WatchService {
} }
} }
async addWatchMapping(collectionName: string, folderPath: string) { addWatchMapping(collectionName: string, folderPath: string) {
await this.ElectronAPIs.addWatchMapping(collectionName, folderPath); this.ElectronAPIs.addWatchMapping(collectionName, folderPath);
} }
async removeWatchMapping(collectionName: string) { removeWatchMapping(collectionName: string) {
await this.ElectronAPIs.removeWatchMapping(collectionName); this.ElectronAPIs.removeWatchMapping(collectionName);
} }
getWatchMappings(): WatchMapping[] { getWatchMappings(): WatchMapping[] {