Skip to content

Commit

Permalink
Fix WS URL
Browse files Browse the repository at this point in the history
  • Loading branch information
jvmusin committed Mar 18, 2024
1 parent 9050849 commit 4091f2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/lib/WebSocketNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ function Toast({ title, description }: { title: string; description: string }) {
}

export function WebSocketNotifications() {
const ws = useWebSocket('ws://localhost:8080/ws', {
const wsUrl = document.location.origin.replace(/^http/, 'ws') + '/ws'
const ws = useWebSocket(wsUrl, {
onOpen: (e) => {
console.log('Connected to server', e)
toast.success(
Expand Down

0 comments on commit 4091f2c

Please sign in to comment.