@@ -14,11 +14,11 @@ import TextField from "../../../components/common/TextField.tsx";
1414import Button from "../../../components/common/Button.tsx" ;
1515import SelectField from "../../../components/common/SelectField.tsx" ;
1616import { useNavigate } from "react-router-dom" ;
17- import { getCoordsFromAddress } from "../../../utils/kakaoGeocoder.ts" ;
1817import ResetIcon from "../../../components/icons/ResetIcon.tsx" ;
1918import GpsMapPreview from "../../../components/common/GpsMapPreview.tsx" ;
2019import { toast } from "react-toastify" ;
2120import { showConfirm } from "../../../libs/showConfirm.ts" ;
21+ import { getCoordsFromAddress } from "../../../utils/naverGeocoder.ts" ;
2222
2323const StoreInfoEditPage = ( ) => {
2424 useLayout ( {
@@ -54,27 +54,29 @@ const StoreInfoEditPage = () => {
5454 } ) ;
5555
5656 useEffect ( ( ) => {
57- if ( ! selectedStore ) return ;
58-
5957 const fetchData = async ( ) => {
58+ if ( ! selectedStore ) return ;
6059 const data = await getStoreInfo ( selectedStore . storeId ) ;
60+
6161 setValue ( "storeName" , data . storeName ) ;
6262 setValue ( "businessNumber" , data . businessNumber ) ;
6363 setValue ( "storeType" , data . storeType ) ;
6464 setValue ( "address" , data . address ) ;
6565 setValue ( "overtimeLimit" , data . overtimeLimit ) ;
6666
67- // 주소 기반 좌표 설정
6867 try {
69- const coords = await getCoordsFromAddress ( data . address ) ;
70- setValue ( "latitude" , coords . latitude ) ;
71- setValue ( "longitude" , coords . longitude ) ;
68+ const { latitude, longitude } = await getCoordsFromAddress (
69+ data . address ,
70+ ) ;
71+ setValue ( "latitude" , latitude ) ;
72+ setValue ( "longitude" , longitude ) ;
7273 } catch ( err ) {
7374 console . error ( "좌표 변환 실패" , err ) ;
7475 }
7576 } ;
77+
7678 fetchData ( ) ;
77- } , [ selectedStore , setValue ] ) ;
79+ } , [ selectedStore ] ) ;
7880
7981 useEffect ( ( ) => {
8082 if ( selectedStore ) {
0 commit comments