Reduce environment variables number + optimise code

This commit is contained in:
2022-02-11 11:36:53 +02:00
parent 9b73c08fc8
commit 08a261e491
3 changed files with 17 additions and 26 deletions

View File

@@ -4,7 +4,7 @@ import EventList from '../eventList/EventList.js';
function App(props) {
const [events, setEvents] = useState(['EventLog']); // initialises Event state
const [sse, setSse] = useState(new EventSource('/events', { withCredentials: true})) // creates eventSource listener
const [sse, setSse] = useState(new EventSource('/events', { withCredentials: true})) // creates eventSource listener in state
useEffect(() => {