Skip to content

Commit

Permalink
πŸ› fix: κ²€μƒ‰ν•œ λ„λ‘œλͺ… μ£Όμ†Œ 선택 λΆˆκ°€ ν˜„μƒ μˆ˜μ • #148
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMirror21 committed Jan 9, 2025
1 parent ef427b0 commit c4280c2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/hooks/api/useAddressSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ interface UseAddressSearchReturn {

export const useAddressSearch = (): UseAddressSearchReturn => {
const [addressInput, setAddressInput] = useState('');
const [addressSearchResult, setAddressSearchResult] = useState<Document[]>([]);
const [addressSearchResult, setAddressSearchResult] = useState<Document[]>(
[],
);
const [currentGeoInfo, setCurrentGeoInfo] = useState({
lat: 0,
lon: 0,
Expand Down Expand Up @@ -58,7 +60,7 @@ export const useAddressSearch = (): UseAddressSearchReturn => {

if (!selectedAddress) return;

const isRoadAddr = selectedAddress.address_type === AddressType.ROAD_ADDR;
const isRoadAddr = selectedAddress.address_type === AddressType.ROAD;
const addressData = isRoadAddr
? selectedAddress.road_address
: selectedAddress.address;
Expand Down Expand Up @@ -106,4 +108,4 @@ export const useAddressSearch = (): UseAddressSearchReturn => {
setAddressInput,
setCurrentGeoInfo,
};
};
};

0 comments on commit c4280c2

Please sign in to comment.