Skip to content

Commit

Permalink
Merge pull request #261 from TEAM-MONGDOL/develop
Browse files Browse the repository at this point in the history
[merge] - develop > main 머지
  • Loading branch information
Ginieee authored Aug 19, 2024
2 parents 5d92087 + 7b41b56 commit 68ac1b7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down Expand Up @@ -97,6 +98,12 @@ const AdminWorkationPlaceEditPage = ({ params }: WkPlaceEditProps) => {
}));
};

const handleAddressClick = () => {
open({
onComplete: handleComplete,
});
};

const { data: kakaoAddress } = useGetKakaoAdddress({
address: originAddress,
});
Expand Down Expand Up @@ -165,8 +172,9 @@ const AdminWorkationPlaceEditPage = ({ params }: WkPlaceEditProps) => {
subtitle="주소"
placeholder="주소를 입력하세요."
value={values.address}
onChange={handleChange}
status="cursor"
name="address"
onClick={() => handleAddressClick()}
/>
</div>
<div className="flex w-full gap-7">
Expand All @@ -184,6 +192,12 @@ const AdminWorkationPlaceEditPage = ({ params }: WkPlaceEditProps) => {
onChange={() => {}}
/>
</div>
{kakaoAddress && (
<KakaoMapContainer
latitude={kakaoAddress.documents[0].y}
longitude={kakaoAddress.documents[0].x}
/>
)}
<div className="flex flex-col gap-4 py-7">
{values.fileInfos.length > 0 && (
<div className="py-2">
Expand Down
1 change: 1 addition & 0 deletions src/app/_hooks/admin/useGetWkPlaceListQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ export const useGetWkPlaceListQuery = ({
});
return workationPlaceListSchema.parse(res.data.data);
},
refetchOnMount: true,
});
};

0 comments on commit 68ac1b7

Please sign in to comment.