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}`