mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-06 20:43:13 +08:00
Fixed bug with overwriting opened tabs. Added proxy for websocket
This commit is contained in:
@@ -50,7 +50,11 @@ const WeatherWidget = (): JSX.Element => {
|
||||
|
||||
// Open socket for data updates
|
||||
useEffect(() => {
|
||||
const webSocketClient = new WebSocket('ws://localhost:5005');
|
||||
const webSocketClient = new WebSocket(`ws://${window.location.host}/socket`);
|
||||
|
||||
webSocketClient.onopen = () => {
|
||||
console.log('Socket: listen')
|
||||
}
|
||||
|
||||
webSocketClient.onmessage = (e) => {
|
||||
const data = JSON.parse(e.data);
|
||||
|
||||
Reference in New Issue
Block a user