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(() => {
if (shouldUpdateMappings) {
setMappings(watchService.ElectronAPIs.getWatchMappings());
setMappings(watchService.getWatchMappings());
setShouldUpdateMappings(false);
}
}, [shouldUpdateMappings]);

View file

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