refactor: small cleanups (#2059)

* refactor: remove unneeded async

* chore: add express Router type to all routes

* refactor: don't use index in react key

* refactor: correctly get error message in excel route

* refactor: avoid exporting muteable values
This commit is contained in:
Alex Christoffer Rasmussen
2026-04-26 17:32:50 +02:00
committed by GitHub
parent 23a44b2f04
commit 7c1d2f4554
22 changed files with 55 additions and 49 deletions
+4 -2
View File
@@ -51,8 +51,10 @@ const socketConfig = {
offlineAttemptsThreshold: 2, // when we consider the client disconnected
} as const;
export let hasConnected = false;
export let reconnectAttempts = 0;
export const getConnectionState = () => hasConnected;
export const getReconnectAttempts = () => reconnectAttempts;
let hasConnected = false;
let reconnectAttempts = 0;
export const connectSocket = () => {
websocket = new WebSocket(websocketUrl);