Skip to content

Commit

Permalink
fix : reconnect msg language err
Browse files Browse the repository at this point in the history
  • Loading branch information
flowersayo committed May 19, 2023
1 parent a01f7ff commit 24775ac
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions client/src/utils/WebSocketProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const WebsocketProvider = ({ children }) => {
const ws = useRef(null);
// 웹소켓 연결

const savedMode = localStorage.getItem("language_mode");
function createWebSocketConnection(name, setIsLoading) {
return new Promise((resolve, reject) => {
const token = localStorage.getItem("access_token");
Expand Down Expand Up @@ -58,11 +57,8 @@ export const WebsocketProvider = ({ children }) => {
return;
}

if (savedMode) {
alert(Language[1].reconnection_request);
} else {
alert(Language[0].reconnection_request);
}
alert(Language[mode].reconnection_request);

setIsReady(false);
navigate("/");
reject();
Expand Down

0 comments on commit 24775ac

Please sign in to comment.