diff --git a/App.tsx b/App.tsx index fe46664..baf34a5 100644 --- a/App.tsx +++ b/App.tsx @@ -240,6 +240,8 @@ const App: React.FC = () => { initializeData(cachedData); setLastUpdated(cachedDate); setLoading(false); + // Trigger background sync to ensure data is fresh + handleDataFetch().catch(e => console.warn("Background sales sync failed", e)); } else { console.log("Fetching fresh data from Permanent URL..."); handleDataFetch().catch(e => { @@ -252,6 +254,8 @@ const App: React.FC = () => { if (cachedAds && cachedAds.length > 0) { console.log("Loaded ads from cache:", cachedAds.length, "records"); setAdsData(cachedAds); + // Trigger background sync + handleAdsFetch(); } else { console.log("Fetching fresh Ads from URL..."); handleAdsFetch(); @@ -481,16 +485,33 @@ const App: React.FC = () => { {/* Title & Status */}
- - Live Sync Active -
- )} +