diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 4fdebb3..ccfbc13 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -87,8 +87,7 @@ function App() { if(cmd.command_result != 0) { throw new Error(cmd.error); } - setUser(null) - setIsAuthenticated(false) + location.reload(); }); } }, [client]); diff --git a/frontend/src/api/socket.js b/frontend/src/api/socket.js index ae8e437..43cfb7a 100644 --- a/frontend/src/api/socket.js +++ b/frontend/src/api/socket.js @@ -138,6 +138,7 @@ export async function Connect() { }; tmp_websocket.addEventListener("open", open); const close = async () => { + location.reload(); websocket = null; connecting = false; tmp_websocket.removeEventListener("close", close);