proxy routing issue'
This commit is contained in:
parent
0d42ff72d3
commit
d077292bbc
9 changed files with 42 additions and 17 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
|
|
@ -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' },
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue