diff --git a/packages/common/business_components/src/ui/map/searchBar/procSearchBar.tsx b/packages/common/business_components/src/ui/map/searchBar/procSearchBar.tsx index b3f715086..6786ae79a 100644 --- a/packages/common/business_components/src/ui/map/searchBar/procSearchBar.tsx +++ b/packages/common/business_components/src/ui/map/searchBar/procSearchBar.tsx @@ -1,4 +1,4 @@ -"use client"; +"use client"; import { SelectBox, type SelectDataType } from "../../../ui"; import { Button } from "@common/components/ui"; import { useCallback, useEffect, useState } from "react"; @@ -29,7 +29,7 @@ interface SearchBarProps { } interface CenterSelectDataType extends SelectDataType { - center?: [number, number]; // 醫뚰몴 以묒떖 ?꾩튂 + center?: [number, number]; // 좌표 중심 위치 } export const ProcSearchBar = ({ @@ -74,7 +74,7 @@ export const ProcSearchBar = ({ center: sidoCenter[String(f.properties.mctpv_cd ?? "").trim()] //getGeometryCenter(f.geometry) ?? undefined, })) .sort((a: any, b: any) => { - // 而ㅼ뒪? ?쒖꽌 ?뺤쓽 + // 커스텀 순서 정의 const customOrder = [ "서울특별시", "부산광역시", @@ -98,19 +98,19 @@ export const ProcSearchBar = ({ const indexA = customOrder.indexOf(a.text); const indexB = customOrder.indexOf(b.text); - // ????而ㅼ뒪? ?쒖꽌???덉쑝硫??대떦 ?쒖꽌濡? + // 둘 다 커스텀 순서에 있으면 해당 순서로 if (indexA !== -1 && indexB !== -1) { return indexA - indexB; } - // ?섎굹留?而ㅼ뒪? ?쒖꽌???덉쑝硫?洹멸쾬???욎쑝濡? + // 하나만 커스텀 순서에 있으면 그것을 앞으로 if (indexA !== -1) return -1; if (indexB !== -1) return 1; - // ????而ㅼ뒪? ?쒖꽌???놁쑝硫?湲곕낯 ?뚰뙆踰??쒖꽌 + // 둘 다 커스텀 순서에 없으면 기본 알파벳 순서 return a.text.localeCompare(b.text, 'ko'); }); - setSidoData([{ text: "?쒕룄", val: "0" }, ...list]); + setSidoData([{ text: "시도", val: "0" }, ...list]); }; const fetchSigungu = async () => { @@ -174,7 +174,7 @@ export const ProcSearchBar = ({ const json = await res.json(); list = (json.features || []) .map((f: any) => ({ - text: f.properties.swtrmt_fclt_nm ?? "(?대쫫?놁쓬)", + text: f.properties.swtrmt_fclt_nm ?? "(이름없음)", val: f.id, })) .sort((a: any, b: any) => a.text.localeCompare(b.text, "ko")); @@ -193,28 +193,28 @@ export const ProcSearchBar = ({ }); const json = await res.json(); list = (json.data || []).map((item: any) => ({ - text: item.ruseUtztnFcltNm ?? "(?대쫫?놁쓬)", + text: item.ruseUtztnFcltNm ?? "(이름없음)", val: item.pbnstRuseFcltId, })); } else if (type === "tb_wr_ruse_fclt_dmd_co") { const res = await fetch(url); const json = await res.json(); list = (json.data || []).map((item: any) => ({ - text: item.dmdCoNm ?? "(?대쫫?놁쓬)", + text: item.dmdCoNm ?? "(이름없음)", val: item.dmdInfoId, })); } else if (type === "tb_wr_tmpr_dmd_co") { const res = await fetch(url); const json = await res.json(); list = (json.data || []).map((item: any) => ({ - text: item.dmdCoNm ?? "(?대쫫?놁쓬)", + text: item.dmdCoNm ?? "(이름없음)", val: item.fctryMngSn, })); } else { const res = await fetch(url); const json = await res.json(); list = (json.data || []).map((item: any) => ({ - text: item.bdstNm ?? "(?대쫫?놁쓬)", + text: item.bdstNm ?? "(이름없음)", val: item.bdstInfoSn, })); } @@ -436,7 +436,7 @@ export const ProcSearchBar = ({ />