style: Update API URL construction for improved endpoint clarity
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import Map3D from './components/Map3D';
|
||||
import ControlPanel from './components/ControlPanel';
|
||||
import VoiceControl from './components/VoiceControl';
|
||||
@@ -21,7 +21,7 @@ function App() {
|
||||
}, [connect]);
|
||||
|
||||
const renderPanelContent = () => {
|
||||
const apiUrl = import.meta.env.VITE_API_URL || `${window.location.protocol}//${window.location.host}/api`;
|
||||
const apiUrl = import.meta.env.VITE_API_URL || `${window.location.protocol}//${window.location.host}`;
|
||||
const wsUrl = import.meta.env.VITE_WS_URL || `${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${window.location.host}/ws`;
|
||||
|
||||
switch (panelTab) {
|
||||
|
||||
Reference in New Issue
Block a user