fix: wevbsocket url is always localhost (#1072)

This commit is contained in:
Meier Lukas authored and GitHub committed 2024-09-06 21:11:58 +02:00
1 parent 753d091dbb
commit 8c205535eb
4 files changed
+14 -9

No files matched your search

@@ -12,7 +12,7 @@ import type { AppRouter } from "@homarr/api";
import { clientApi } from "@homarr/api/client";
const wsClient = createWSClient({
url: "ws://localhost:3001",
url: typeof window === "undefined" ? "ws://localhost:3001" : `ws://${window.location.hostname}:3001`,
});
export function TRPCReactProvider(props: PropsWithChildren) {