Fix: Use NEXT_PUBLIC_API_URL for all image URLs
This commit is contained in:
@@ -324,6 +324,8 @@ interface BannerCardProps {
|
||||
height: number;
|
||||
}
|
||||
|
||||
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
|
||||
|
||||
// 이미지 URL 변환 (로컬 경로는 백엔드 URL 추가)
|
||||
const getImageUrl = (url: string): string => {
|
||||
if (!url) return '';
|
||||
@@ -331,7 +333,7 @@ const getImageUrl = (url: string): string => {
|
||||
return url;
|
||||
}
|
||||
// 로컬 경로인 경우 백엔드 URL 추가
|
||||
return `http://localhost:8000${url}`;
|
||||
return `${API_BASE_URL}${url}`;
|
||||
};
|
||||
|
||||
// Helper to get localized title/subtitle based on language
|
||||
|
||||
Reference in New Issue
Block a user