Skip to content

Commit

Permalink
fix(search): 개별 차량 검색 시, 해당 좌표로 이동 안 하는 문제 해결 (#97)
Browse files Browse the repository at this point in the history
- { lat, lng }으로 되어있어야 하는 구조가, { lat, lat }으로 되어 있어서 발생한 문제
  • Loading branch information
red-dev-Mark committed Jan 25, 2025
1 parent 6752f56 commit bf06b0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/(main)/location/LocationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ const LocationPage = () => {
setIsDetailsCardVisible(true)
}

const isVehicleMarkerVisible = isVehicleVisible && vehicleInfo
const isVehicleDetailsVisible = isDetailsCardVisible && vehicleDetails
const isVehicleMarkerVisible = !!(isVehicleVisible && vehicleInfo)
const isVehicleDetailsVisible = !!(isDetailsCardVisible && vehicleDetails)

return (
<div className={styles.container}>
Expand Down
3 changes: 1 addition & 2 deletions app/(main)/location/components/VehicleMarker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ const VehicleMarker = ({ vehicleInfo, onVehicleClick }: VehicleMarkerProps) => {
setIsDescriptionVisible(false)
}, 3000)
}, [])

const vehicleNumber = vehicleInfo.vehicleNumber.slice(0, 3) + ' ' + vehicleInfo.vehicleNumber.slice(3)
const vehicleCurrentLocation = {
lat: vehicleInfo?.recentCycleInfo.lat,
lng: vehicleInfo?.recentCycleInfo.lat,
lng: vehicleInfo?.recentCycleInfo.lng,
}

return (
Expand Down

0 comments on commit bf06b0f

Please sign in to comment.