소개
게시글
질문&답변
2024.05.13
카카오 주소 검색 기능 401 에러
https://github.com/dydals3440/MatZip 깃허브 주소 같이 전달드립니다!
- 1
- 3
- 83
질문&답변
2024.05.13
카카오 주소 검색 기능 401 에러
import SearchInput from '@/components/common/SearchInput'; import useSearchLocation from '@/hooks/useSearchLocation'; import useUserLocation from '@/hooks/useUserLocation'; import React, {useState} from 'react'; import {Keyboard, StyleSheet, View} from 'react-native'; const SearchLocationScreen = () => { const [keyword, setKeyword] = useState (''); const {userLocation} = useUserLocation(); const {regionInfo} = useSearchLocation(keyword, userLocation); const handleChangeKeyword = (text: string) => { setKeyword(text); }; return ( Keyboard.dismiss()} /> ); }; const styles = StyleSheet.create({ container: { flex: 1, padding: 20, }, }); export default SearchLocationScreen; import axios from 'axios'; import {useEffect, useState} from 'react'; import Config from 'react-native-config'; import {LatLng} from 'react-native-maps'; type Meta = { total_count: number; pageable_count: number; is_end: boolean; same_name: { region: string[]; keyword: string; selected_region: string; }; }; export type RegionInfo = { address_name: string; category_group_code: string; category_group_name: string; category_name: string; distance: string; id: string; phone: string; place_name: string; place_url: string; road_address_name: string; x: string; y: string; }; type RegionResponse = { meta: Meta; documents: RegionInfo[]; }; function useSearchLocation(keyword: string, location: LatLng) { const [regionInfo, setRegionInfo] = useState ([]); const [pageParam, setPageParam] = useState(1); console.log(keyword, location); useEffect(() => { (async () => { try { const {data} = await axios.get( `https://dapi.kakao.com/v2/local/search/address.json?query=${keyword}&y=${location.latitude}&x=${location.longitude}&page=${pageParam}`, { headers: { Authorization: `KakaoAK ${Config.KAKAO_REST_API_KEY}`, }, }, ); console.log('data', data); } catch (error) { console.log(error); } })(); }, [keyword, location]); return {regionInfo}; } export default useSearchLocation; GOOGLE_API_KEY=키값들 KAKAO_REST_API_KEY=키값들
- 1
- 3
- 83
질문&답변
2024.05.08
ios 빌드 에러! 안드는 정상 동작
위와 동일하게 했는데 x-code 상에서 아래와 같은 에러를 보여줍니다... 이전에는 잘 됐는데, 비슷하게 복습하면서 다른 것을 만들어볼려고 하는데, 이번에는 잘 안되네요...(사진)
- 1
- 2
- 138
질문&답변
2024.05.05
marker.d.ts 관련
저도 위와 동일한 에러가 발생했는데 어떻게 해결하셨을까요?
- 1
- 2
- 74
질문&답변
2024.05.03
로그인 통신 질문
감사합니다. 뒤에 강좌에서 확인했습니다. 여러모로 많이 배우는 강좌인 것 같습니다. 친절하고 빠른 답변과 좋은 강의 감사합니다!!
- 1
- 2
- 73