{searchedPlace.map((place) => (
(
containerRef: RefObject
,
- setLoading: React.Dispatch>,
+ setLoading: React.Dispatch>,
) {
const { kakao } = window;
const [map, setMap] = useState();
@@ -30,7 +30,6 @@ function useMap(
}).then((res) => res.json()),
{
onSuccess: (data) => {
- setLoading(false);
if (data.success === false) {
throw new Error(data.error.message);
}
@@ -46,6 +45,7 @@ function useMap(
const onLoadKakaoMap = () => {
if (!containerRef.current || !kakao) return;
+ setLoading('근처 보호소 검색');
window.kakao.maps.load(() => {
setMap(
new window.kakao.maps.Map(containerRef.current, {
@@ -55,6 +55,7 @@ function useMap(
);
function placesSearchCB(data: any[], status: any) {
+ setLoading('');
if (status === kakao.maps.services.Status.OK) {
const bounds = new kakao.maps.LatLngBounds();
diff --git a/src/pages/profileList/components/ProfileList.tsx b/src/pages/profileList/components/ProfileList.tsx
index 80a97b42..13329b46 100644
--- a/src/pages/profileList/components/ProfileList.tsx
+++ b/src/pages/profileList/components/ProfileList.tsx
@@ -15,7 +15,6 @@ const ProfileList = (prop: { prop: string }) => {
navigate(`/profile/${prop.prop}/${page}`);
};
const word = prop.prop === 'urgent' ? 'sos' : prop.prop;
- console.log(word);
const [list, setList] = useState(null);