Spaces:
Build error
Build error
Álvaro Valenzuela Valdes commited on
Commit ·
0751492
1
Parent(s): c012670
📊 Dashboard: Simplified sync imports to resolve button interaction issues
Browse files
frontend/components/Dashboard.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import StatCard from "./StatCard";
|
|
| 2 |
import { Tender } from "../lib/types";
|
| 3 |
import { useEffect, useMemo, useState } from "react";
|
| 4 |
import BrandLoader from "./BrandLoader";
|
| 5 |
-
import { searchTenders, fetchDbStatus } from "../lib/api";
|
| 6 |
|
| 7 |
import { translations, Language } from "../lib/translations";
|
| 8 |
|
|
@@ -40,7 +40,6 @@ export default function Dashboard({
|
|
| 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();
|
|
|
|
| 2 |
import { Tender } from "../lib/types";
|
| 3 |
import { useEffect, useMemo, useState } from "react";
|
| 4 |
import BrandLoader from "./BrandLoader";
|
| 5 |
+
import { searchTenders, fetchDbStatus, syncDatabase } from "../lib/api";
|
| 6 |
|
| 7 |
import { translations, Language } from "../lib/translations";
|
| 8 |
|
|
|
|
| 40 |
const handleGlobalSync = async () => {
|
| 41 |
setIsSyncing(true);
|
| 42 |
try {
|
|
|
|
| 43 |
await syncDatabase();
|
| 44 |
await new Promise(r => setTimeout(r, 1500));
|
| 45 |
window.location.reload();
|