Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[merge] - develop > main 머지 #261

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
});
};
Loading