diff --git a/app/web/src/utils/sync/ws-client.ts b/app/web/src/utils/sync/ws-client.ts index 93ba4cd7..9f3c5c9c 100644 --- a/app/web/src/utils/sync/ws-client.ts +++ b/app/web/src/utils/sync/ws-client.ts @@ -164,7 +164,6 @@ const connect = ( } else { return new Promise((resolve, reject) => { if (!conf.ws) { - let reconnect = 0; const retry = () => { const url = new URL(w.basehost || location.href); url.pathname = "/sync"; diff --git a/bun.lockb b/bun.lockb index f35e3a41..defad570 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 7ea04830..e47a4f27 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,9 @@ "pkgs/*" ], "dependencies": { - "@shikijs/core": "^1.12.1", "brotli-wasm": "^3.0.1", - "fdir": "^6.1.0", + "fdir": "^6.2.0", "react-select": "^5.8.0", - "typescript": "^5.2.2" + "typescript": "^5.5.4" } } \ No newline at end of file diff --git a/pkgs/web-utils/src/use-local.ts b/pkgs/web-utils/src/use-local.ts index f8ec0ef0..786947ff 100644 --- a/pkgs/web-utils/src/use-local.ts +++ b/pkgs/web-utils/src/use-local.ts @@ -58,17 +58,20 @@ export const useLocal = ( } else { local.lastRenderCount = 0; } - + local.lastRender = Date.now(); if (local.lastRenderCount > 300) { clearTimeout(local.overRenderTimeout); local.overRenderTimeout = setTimeout(() => { + local.lastRenderCount = 0; local.lastRender = Date.now(); _render({}); }, 1000); - console.error("local.render more than 300 times in less than 300ms"); + console.error( + `local.render executed ${local.lastRenderCount} times in less than 300ms` + ); return; }