빌드 오류 수정

This commit is contained in:
yschoi
2025-07-28 08:56:16 +09:00
parent 15b6520ee1
commit 6ba78d0923
3 changed files with 11 additions and 12 deletions
@@ -1,7 +1,7 @@
'use client';
import { CHART_FORM, MainChart, type ChartConfig } from '@common/business_components';
import React, { useEffect, useRef, useState } from 'react';
import React, { useEffect, useRef, useState, useMemo, useCallback } from 'react';
interface RegionData {
name: string;
@@ -213,7 +213,7 @@ const WrStatusPage: React.FC = () => {
{ region: '제주특별자치도', sewage: '8(1,666)', rainwater: '47(5,746)', reclaimed: '64(660)', thermal: '0' },
];
const regionData: RegionData[] = [
const regionData: RegionData[] = useMemo(() => [
{ name: '서울', x: 170, y: 140, values: [0.3, 0.3, 0.2, 0.2] },
{ name: '인천', x: 120, y: 150, values: [0.3, 0.3, 0.2, 0.2] },
{ name: '경기', x: 210, y: 210, values: [0.3, 0.3, 0.2, 0.2] },
@@ -231,7 +231,7 @@ const WrStatusPage: React.FC = () => {
{ name: '울산', x: 450, y: 500, values: [0.3, 0.3, 0.2, 0.2] },
{ name: '부산', x: 420, y: 550, values: [0.3, 0.3, 0.2, 0.2] },
{ name: '제주', x: 60, y: 750, values: [0.3, 0.3, 0.2, 0.2] },
];
], []);
const handleMarkerClick = (regionId: string) => {
if (selectedRegion === regionId) {
@@ -242,7 +242,7 @@ const WrStatusPage: React.FC = () => {
};
const createDonutMarker = (svg: SVGSVGElement, x: number, y: number, name: string, values: number[]) => {
const createDonutMarker = useCallback((svg: SVGSVGElement, x: number, y: number, name: string, values: number[]) => {
const colors = ['#FF6B6B', '#4ECDC4', '#45B7D1', '#FED16A'];
const radius = 26;
const innerRadius = 18;
@@ -334,7 +334,7 @@ const WrStatusPage: React.FC = () => {
});
svg.appendChild(g);
};
}, []);
useEffect(() => {
const loadSVG = async () => {
@@ -374,7 +374,7 @@ const WrStatusPage: React.FC = () => {
};
loadSVG();
}, []);
}, [createDonutMarker, regionData]);
useEffect(() => {
const svg = svgContainerRef.current?.querySelector('svg');
@@ -14,7 +14,6 @@ interface AccessibleFormFieldProps<T extends FieldValues> {
export function AccessibleFormField<T extends FieldValues>({
label,
required = false,
error,
inputComponent,
}: AccessibleFormFieldProps<T>) {
const labelText = required ? `${label} *` : label;
@@ -56,15 +56,15 @@ export function SdmInfoRegForm({
}, [initializeCommonData]);
useEffect(() => {
console.log("candidateTitle ", form.getValues("candidateTitle"));
}, [form.getValues("candidateTitle")]);
const candidateTitle = form.getValues("candidateTitle");
}, [form.getValues]);
useEffect(() => {
if (useTypesData && useTypesData.length > 0) {
setTimeout(() => {
form.setValue("usePurpose", useTypesData[0]?.val?.toString() || "");
}, 500);
}
}, [useTypesData, form]);
}, [useTypesData, form.setValue]);
useEffect(() => {
if (facilityName) {
@@ -72,7 +72,7 @@ export function SdmInfoRegForm({
form.setValue("sdmNm", facilityName);
setKey((prev) => prev + 1);
}
}, [facilityName, form]);
}, [facilityName, form.setValue]);
useEffect(() => {
if (searchParams.get("dmdCoNm")) {
@@ -80,7 +80,7 @@ export function SdmInfoRegForm({
setSdmNmValue(searchParams.get("dmdCoNm") || "");
setKey((prev) => prev + 1);
}
}, [searchParams, form]);
}, [searchParams, form.setValue]);
const searchCandidate = (e: React.MouseEvent) => {
e.preventDefault();