Skip to content

Commit

Permalink
fix: change ws url
Browse files Browse the repository at this point in the history
  • Loading branch information
pociej committed Jun 14, 2024
1 parent 79d56aa commit 91318cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/.env.production
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VITE_BACKEND_HTTP_URL=https://deposit.dev.golem.network/api
VITE_BACKEND_WS_URL=wss://deposit.dev.golem.network/socket_api
VITE_BACKEND_WS_URL=wss://deposit.dev.golem.network
5 changes: 4 additions & 1 deletion frontend/src/hooks/userUserData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ export const useUserData = () => {

const { data, error } = useSWRSubscription("userData", (key, { next }) => {
socket.on("user", (data: any) => {
console.log("user", data);
setIsLoading(false);
next(null, data);
});

socket.on("error", (error: any) => {
console.error("error is socket io ", error);
});
return () => {
socket.disconnect();
};
Expand Down

0 comments on commit 91318cf

Please sign in to comment.