Spaces:
Build error
Build error
Álvaro Valenzuela Valdes commited on
Commit ·
c012670
1
Parent(s): db6ec96
📊 Dashboard: Improved Global Sync to use explicit backend endpoint
Browse files
frontend/components/Dashboard.tsx
CHANGED
|
@@ -40,8 +40,9 @@ export default function Dashboard({
|
|
| 40 |
const handleGlobalSync = async () => {
|
| 41 |
setIsSyncing(true);
|
| 42 |
try {
|
| 43 |
-
|
| 44 |
-
await
|
|
|
|
| 45 |
window.location.reload();
|
| 46 |
} catch (e) {
|
| 47 |
console.error(e);
|
|
|
|
| 40 |
const handleGlobalSync = async () => {
|
| 41 |
setIsSyncing(true);
|
| 42 |
try {
|
| 43 |
+
const { syncDatabase } = await import("../lib/api");
|
| 44 |
+
await syncDatabase();
|
| 45 |
+
await new Promise(r => setTimeout(r, 1500));
|
| 46 |
window.location.reload();
|
| 47 |
} catch (e) {
|
| 48 |
console.error(e);
|