Fix build

This commit is contained in:
Gregory Schier
2023-03-29 22:15:55 -07:00
parent 968e80b3ad
commit fa32829b2e
9 changed files with 54 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
import { useQueryClient } from '@tanstack/react-query';
import { listen } from '@tauri-apps/api/event';
import { appWindow } from '@tauri-apps/api/window';
import { useEffect } from 'react';
import { debounce } from '../lib/debounce';
@@ -27,6 +28,13 @@ export function useTauriListeners() {
else unsubFns.push(unsub);
});
listen('refresh', () => {
location.reload();
}).then((unsub) => {
if (unmounted) unsub();
else unsubFns.push(unsub);
});
appWindow
.listen(
'updated_request',