feat(sync): follow the visit sync on the dashboard

Show the "Syncing with Steam" badge while a visit sync runs, then
reload the sync changes banner and the library.
This commit is contained in:
lobo committed 2026-10-04 19:05:23 +02:00
1 parent 8aa3181c37
commit e5091de50e
6 files changed
+97 -5

No files matched your search

+4 -1
View File
@@ -1,4 +1,4 @@
import {useState} from 'react';
import {useEffect, useState} from 'react';
import {useTranslation} from 'react-i18next';
import {toast} from 'sonner';
import {RefreshCw} from 'lucide-react';
@@ -72,6 +72,9 @@ const Dashboard = () => {
},
});
const forceSync = useForceSync(sync.watch);
useEffect(() => {
if (steamData.syncStarted) sync.watch();
}, [steamData, sync.watch]);
if (isLoading) {
return <DashboardSkeleton/>;