mirror of
https://github.com/SrIzan10/helium.git
synced 2026-06-06 00:56:58 +00:00
10 lines
249 B
TypeScript
10 lines
249 B
TypeScript
export const useWebSocketUrl = () => {
|
|
if (import.meta.client) {
|
|
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'
|
|
const host = window.location.host
|
|
return `${protocol}//${host}/ws/signaling`
|
|
}
|
|
|
|
return ''
|
|
}
|