From 1cff7740a8b4eda8b853ffef4d4ce076612f926d Mon Sep 17 00:00:00 2001 From: johnny2211 Date: Sun, 18 Jan 2026 17:32:55 +0100 Subject: [PATCH] Fix WordDetailModal: Complete localhost:3000 hardcoding cleanup - Fixed API_URL in WordDetailModal.tsx to use explicit undefined check - This completes the Docker deployment fix for all frontend components - Word info modal now works correctly in Docker via nginx proxy - All 4 locations now use consistent environment-aware URL pattern: * api.ts (API client) * videoPlaylist.ts (video URLs) * VideoUpload.tsx (admin video upload) * WordDetailModal.tsx (word info modal) Fixes: Word info click feature in Docker deployment Co-Authored-By: Auggie --- packages/frontend/src/components/dictionary/WordDetailModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/dictionary/WordDetailModal.tsx b/packages/frontend/src/components/dictionary/WordDetailModal.tsx index d58c5f9..7ee5532 100644 --- a/packages/frontend/src/components/dictionary/WordDetailModal.tsx +++ b/packages/frontend/src/components/dictionary/WordDetailModal.tsx @@ -57,7 +57,7 @@ export function WordDetailModal({ term, open, onClose, onAddToSentence }: WordDe const imageMedia = term.media?.find(m => m.kind === 'IMAGE' || m.kind === 'ILLUSTRATION'); // Construct full video URL - const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:3000'; + const API_URL = import.meta.env.VITE_API_URL !== undefined ? import.meta.env.VITE_API_URL : 'http://localhost:3000'; const videoUrl = videoMedia?.url.startsWith('http') ? videoMedia.url : `${API_URL}${videoMedia?.url}`;