From 20377075a58be53d264062a1b4da84537b602e0c Mon Sep 17 00:00:00 2001 From: Ilia Borovitinov Date: Tue, 10 Dec 2024 18:40:51 +0300 Subject: [PATCH] fixed warnings for CI --- .../write-patterns/patterns/3-shared-persistent/index.tsx | 2 +- examples/write-patterns/shared/app/client.ts | 2 +- examples/yjs/app/electric-editor.tsx | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/write-patterns/patterns/3-shared-persistent/index.tsx b/examples/write-patterns/patterns/3-shared-persistent/index.tsx index 4c3c5b6f45..f63cadedc2 100644 --- a/examples/write-patterns/patterns/3-shared-persistent/index.tsx +++ b/examples/write-patterns/patterns/3-shared-persistent/index.tsx @@ -95,7 +95,7 @@ async function sendRequest( let response: Response | undefined try { response = await api.request(path, method, data) - } catch (err) { + } catch (_err) { // ignore } diff --git a/examples/write-patterns/shared/app/client.ts b/examples/write-patterns/shared/app/client.ts index 967cca7419..cde5d3d291 100644 --- a/examples/write-patterns/shared/app/client.ts +++ b/examples/write-patterns/shared/app/client.ts @@ -40,7 +40,7 @@ async function resilientFetch( // Could also check the status and retry before returning if you want to be // resilient to 4xx and 5xx responses as well as network errors return await fetch(url, options) - } catch (err) { + } catch (_err) { return await retryFetch(url, options, retryCount + 1) } } diff --git a/examples/yjs/app/electric-editor.tsx b/examples/yjs/app/electric-editor.tsx index f280e1a8c8..03a7fe669b 100644 --- a/examples/yjs/app/electric-editor.tsx +++ b/examples/yjs/app/electric-editor.tsx @@ -65,7 +65,11 @@ export default function ElectricEditor() { const toggleStatus = connectivityStatus === `connected` ? `disconnected` : `connected` setConnectivityStatus(toggleStatus) - toggleStatus === `connected` ? network.connect() : network.disconnect() + if (toggleStatus === `connected`) { + network.connect() + } else { + network.disconnect() + } } useEffect(() => {