diff --git a/src/app/(route)/admin/(with-layout)/workation/place/[id]/edit/page.tsx b/src/app/(route)/admin/(with-layout)/workation/place/[id]/edit/page.tsx index c95e0953..a8ff7d8b 100644 --- a/src/app/(route)/admin/(with-layout)/workation/place/[id]/edit/page.tsx +++ b/src/app/(route)/admin/(with-layout)/workation/place/[id]/edit/page.tsx @@ -17,6 +17,7 @@ import { Address, useDaumPostcodePopup } from 'react-daum-postcode'; import { useGetKakaoAdddress } from '@/_hooks/admin/useGetKakaoAddress'; import AdminLoading from '@/_components/admin/adminLoading'; import NetworkError from '@/_components/common/networkError'; +import KakaoMapContainer from '@/_components/common/containers/KakaoMapContainer'; interface WkPlaceEditProps { params: { id: number }; @@ -97,6 +98,12 @@ const AdminWorkationPlaceEditPage = ({ params }: WkPlaceEditProps) => { })); }; + const handleAddressClick = () => { + open({ + onComplete: handleComplete, + }); + }; + const { data: kakaoAddress } = useGetKakaoAdddress({ address: originAddress, }); @@ -165,8 +172,9 @@ const AdminWorkationPlaceEditPage = ({ params }: WkPlaceEditProps) => { subtitle="주소" placeholder="주소를 입력하세요." value={values.address} - onChange={handleChange} + status="cursor" name="address" + onClick={() => handleAddressClick()} />
@@ -184,6 +192,12 @@ const AdminWorkationPlaceEditPage = ({ params }: WkPlaceEditProps) => { onChange={() => {}} />
+ {kakaoAddress && ( + + )}
{values.fileInfos.length > 0 && (
diff --git a/src/app/_hooks/admin/useGetWkPlaceListQuery.ts b/src/app/_hooks/admin/useGetWkPlaceListQuery.ts index 343426db..466fc8e8 100644 --- a/src/app/_hooks/admin/useGetWkPlaceListQuery.ts +++ b/src/app/_hooks/admin/useGetWkPlaceListQuery.ts @@ -21,5 +21,6 @@ export const useGetWkPlaceListQuery = ({ }); return workationPlaceListSchema.parse(res.data.data); }, + refetchOnMount: true, }); };