diff --git a/frontend/components/dashboard/DashboardViewer.tsx b/frontend/components/dashboard/DashboardViewer.tsx
index 176acfb0..4ad23fa8 100644
--- a/frontend/components/dashboard/DashboardViewer.tsx
+++ b/frontend/components/dashboard/DashboardViewer.tsx
@@ -364,6 +364,13 @@ interface ViewerElementProps {
* - 태블릿 이하: 세로 스택 카드 레이아웃
*/
function ViewerElement({ element, data, isLoading, onRefresh, isMobile, canvasWidth = 1920 }: ViewerElementProps) {
+ const [isMounted, setIsMounted] = useState(false);
+
+ // 마운트 확인 (Leaflet 지도 초기화 문제 해결)
+ useEffect(() => {
+ setIsMounted(true);
+ }, []);
+
if (isMobile) {
// 태블릿 이하: 세로 스택 카드 스타일
return (
@@ -397,7 +404,11 @@ function ViewerElement({ element, data, isLoading, onRefresh, isMobile, canvasWi
)}
- {element.type === "chart" ? (
+ {!isMounted ? (
+
+ ) : element.type === "chart" ? (
) : (
renderWidget(element)
@@ -454,16 +465,17 @@ function ViewerElement({ element, data, isLoading, onRefresh, isMobile, canvasWi
)}
-
- {element.type === "chart" ? (
+
+ {!isMounted ? (
+
+ ) : element.type === "chart" ? (
) : (
renderWidget(element)
diff --git a/frontend/components/dashboard/widgets/CustomMetricWidget.tsx b/frontend/components/dashboard/widgets/CustomMetricWidget.tsx
index 0dba9473..52c8411c 100644
--- a/frontend/components/dashboard/widgets/CustomMetricWidget.tsx
+++ b/frontend/components/dashboard/widgets/CustomMetricWidget.tsx
@@ -374,9 +374,9 @@ export default function CustomMetricWidget({ element }: CustomMetricWidgetProps)
}
return (
-
+
{/* 콘텐츠 영역 - 스크롤 없이 자동으로 크기 조정 */}
-
+
{/* 그룹별 카드 (활성화 시) */}
{isGroupByMode &&
groupedCards.map((card, index) => {
@@ -388,10 +388,10 @@ export default function CustomMetricWidget({ element }: CustomMetricWidgetProps)
return (
-
{card.label}
-
{card.value.toLocaleString()}
+
{card.label}
+
{card.value.toLocaleString()}
);
})}
@@ -404,12 +404,12 @@ export default function CustomMetricWidget({ element }: CustomMetricWidgetProps)
return (
-
{metric.label}
-
+
{metric.label}
+
{formattedValue}
- {metric.unit}
+ {metric.unit}
);