diff --git a/src/components/Map/MapUser.jsx b/src/components/Map/MapUser.jsx index 20d581c..ca37877 100644 --- a/src/components/Map/MapUser.jsx +++ b/src/components/Map/MapUser.jsx @@ -18,6 +18,7 @@ const MapUser = ({ latitude, longitude, width, height, dogId }) => { //const dogId = query.get("dogId"); const keyword = query.get("keyword"); + // eslint-disable-next-line no-unused-vars const initialLocation = { latitude, longitude }; // eslint-disable-next-line no-unused-vars const { mapContainer, map, selectedDog, setSelectedDog, markers } = @@ -89,6 +90,7 @@ const MapUser = ({ latitude, longitude, width, height, dogId }) => { }; MapUser.propTypes = { + dogId: PropTypes.number.isRequired, latitude: PropTypes.number.isRequired, longitude: PropTypes.number.isRequired, width: PropTypes.string, diff --git a/src/hooks/useKakaoMap.js b/src/hooks/useKakaoMap.js index a20457c..80e7482 100644 --- a/src/hooks/useKakaoMap.js +++ b/src/hooks/useKakaoMap.js @@ -1,4 +1,5 @@ import { useEffect, useRef, useState, useCallback } from "react"; +// eslint-disable-next-line no-unused-vars import { getCoordinates } from "../apis/geolocation"; import { getAllDogs } from "../apis/getAllDogs"; import { getBoringDogs } from "../apis/getBoringDogs"; @@ -11,6 +12,7 @@ const useKakaoMap = (appKey, initialLocation, isBoring = false) => { const [marker, setMarker] = useState(null); const [dogMarkers, setDogMarkers] = useState([]); const [selectedDog, setSelectedDog] = useState(null); + // eslint-disable-next-line no-unused-vars const [positionArr, setPositionArr] = useState([]); const makeLine = useCallback( diff --git a/src/pages/Map/MapStatus.jsx b/src/pages/Map/MapStatus.jsx index 607b2f8..58bee35 100644 --- a/src/pages/Map/MapStatus.jsx +++ b/src/pages/Map/MapStatus.jsx @@ -54,6 +54,7 @@ const MapStatus = () => { const [walkUserId, setWalkUserId] = useState(""); const [ownerId, setOwnerId] = useState(""); const [socket, setSocket] = useState(null); + // eslint-disable-next-line no-unused-vars const [roomId, setRoomId] = useState(null); // ownerId 설정 diff --git a/src/pages/Map/MapStatusUser.jsx b/src/pages/Map/MapStatusUser.jsx index f0d0055..b6734cf 100644 --- a/src/pages/Map/MapStatusUser.jsx +++ b/src/pages/Map/MapStatusUser.jsx @@ -9,6 +9,7 @@ import { getMarkedTrails } from "../../apis/trail"; import { saveWalkData } from "../../apis/walk"; import { getDistance } from "../../utils/getDistance"; import { getUserInfo } from "../../apis/getUserInfo"; +// eslint-disable-next-line no-unused-vars import { fetchChatRooms } from "../../apis/chatApi"; import authApi from "../../apis/authApi"; import html2canvas from "html2canvas"; @@ -152,11 +153,13 @@ const MapStatusUser = () => { const [ownerImage, setOwnerImage] = useState(""); const [walkUserId, setWalkUserId] = useState(0); const [showInfo, setShowInfo] = useState(false); + // eslint-disable-next-line no-unused-vars const [roomId, setRoomId] = useState(null); const [appointmentId, setAppointmentId] = useState(null); const [walkId, setWalkId] = useState(null); const previousLocation = useRef(initialLocation); + // eslint-disable-next-line no-unused-vars const { mapContainer, map, currentLocation, setCurrentLocation } = useUserMap( process.env.REACT_APP_KAKAO_JAVASCRIPT_KEY, dogId, @@ -269,7 +272,10 @@ const MapStatusUser = () => { }; setCurrentLocation(newCurrentLocation); - const dist = getDistance(previousLocation.current, newCurrentLocation); + const dist = getDistance( + previousLocation.current, + newCurrentLocation, + ); previousLocation.current = newCurrentLocation; setDistance((prevDistance) => { const newDistance = prevDistance + dist; @@ -531,8 +537,8 @@ const MapStatusUser = () => { {walkStage === "during" ? "와 산책중입니다!" : walkStage === "before" - ? "과 산책을 시작합니다." - : "와의 산책이 종료되었습니다."} + ? "과 산책을 시작합니다." + : "와의 산책이 종료되었습니다."}
diff --git a/src/pages/MyInfo/ReviewReceived.jsx b/src/pages/MyInfo/ReviewReceived.jsx index 5b94ef5..28ebc03 100644 --- a/src/pages/MyInfo/ReviewReceived.jsx +++ b/src/pages/MyInfo/ReviewReceived.jsx @@ -60,7 +60,7 @@ const ReceivedReview = () => {아직 작성된 리뷰가 없습니다😢
) : ( walkingReviews.map((review, index) => ( @@ -70,7 +70,7 @@ const ReceivedReview = () => {아직 작성된 리뷰가 없습니다😢
) : ( userReviews.map((review, index) => ( diff --git a/src/pages/MyInfo/ReviewWritten.jsx b/src/pages/MyInfo/ReviewWritten.jsx index c9f92eb..d4d183e 100644 --- a/src/pages/MyInfo/ReviewWritten.jsx +++ b/src/pages/MyInfo/ReviewWritten.jsx @@ -60,7 +60,7 @@ const SentReview = () => {아직 작성된 리뷰가 없습니다😢
) : ( userReviews.map((review, index) => ( @@ -70,7 +70,7 @@ const SentReview = () => {아직 작성된 리뷰가 없습니다😢
) : ( walkingReviews.map((review, index) => (