From 5624ea9dc2eeef3c006fae08a7e2d359580fb08e Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 11 Sep 2023 23:08:57 +0200 Subject: [PATCH] added sse --- src/Components/LogCard/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Components/LogCard/index.js b/src/Components/LogCard/index.js index 45824fa..05f38ce 100644 --- a/src/Components/LogCard/index.js +++ b/src/Components/LogCard/index.js @@ -81,6 +81,7 @@ export default function LogCard({ currentDate.getMonth() + 1 }-${currentDate.getFullYear()}`; + // only open the sse connection if the selected date is today if (selectedDate === today) { sseEventSource.current = new EventSource( `${logApiAddress}/sse/${type}/${selectedDate}`