proxy routing issue'

This commit is contained in:
debu-2 2026-10-02 12:32:20 +05:30
parent 0d42ff72d3
commit d077292bbc
9 changed files with 42 additions and 17 deletions

View file

@ -14,7 +14,7 @@ import {
type VoiceCall,
} from '../../lib/api'
const API_BASE_URL = import.meta.env.VITE_API_URL ?? 'http://localhost:8000'
import { API_BASE_URL } from '../../lib/apiBase'
function FieldRow({ label, value }: { label: string; value: string }) {
return (

View file

@ -13,7 +13,7 @@ import {
} from '../../lib/api'
import { buildMessage, splitTemplate } from '../messaging/templateUtils'
const API_BASE_URL = import.meta.env.VITE_API_URL ?? 'http://localhost:8000'
import { API_BASE_URL } from '../../lib/apiBase'
const OTP_TEMPLATE_TYPES = [
{ type: 'general_verification', name: 'General Verification' },

View file

@ -2,16 +2,9 @@ import { Mic, MicOff, Phone, PhoneOutgoing, Radio, ShieldCheck } from 'lucide-re
import { useCallback, useEffect, useRef, useState } from 'react'
import { Link } from 'react-router-dom'
import { numbersApi, voiceApi, type PhoneNumber, type VoiceApiDocs, type VoiceCall } from '../../lib/api'
import { API_BASE_URL, wsBaseUrl } from '../../lib/apiBase'
import { UrmiConsoleAudio, extractStreamId, type AudioPermissionState } from './voiceAudio'
const API_BASE_URL = import.meta.env.VITE_API_URL ?? 'http://localhost:8000'
function wsBaseUrl() {
const url = new URL(API_BASE_URL)
url.protocol = url.protocol === 'https:' ? 'wss:' : 'ws:'
return url.origin
}
function formatPhone(value: string) {
if (value.length === 10) return `${value.slice(0, 5)} ${value.slice(5)}`
return value