Skip to content

Commit f3e9ad3

Browse files
committed
fix: Removed unused value and console.log
1 parent e934b3f commit f3e9ad3

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

screens/Map/MapScreen.jsx

-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export default function MapScreen({ navigation }) {
3535
const snapPoints = useMemo(() => ['15%', '40%', '95%'], []);
3636

3737
const handleSheetChanges = useCallback((index) => {
38-
console.log('handleSheetChanges', index);
3938
setBottomDrawerState(index);
4039
}, []);
4140

@@ -60,8 +59,6 @@ export default function MapScreen({ navigation }) {
6059
const [searchBarHeight, setSearchBarHeight] = useState(0);
6160
const [textInputValue, setTextInputValue] = useState('');
6261

63-
const [estimateDistance, setEstimateDistance] = useState(null);
64-
6562
const mapView = useRef(null);
6663
const changeCenter = (newCenterLatitude, newCenterLongitude) => {
6764
mapView.current.animateToRegion({
@@ -108,7 +105,6 @@ export default function MapScreen({ navigation }) {
108105
latitude: currentLocation.coords.latitude,
109106
longitude: currentLocation.coords.longitude,
110107
});
111-
console.log(currentLocation.coords.latitude, ', ', currentLocation.coords.longitude);
112108
},
113109
);
114110
})();
@@ -165,7 +161,6 @@ export default function MapScreen({ navigation }) {
165161
setTextInputValue(marker.name);
166162
handleSnapPress(1);
167163
changeCenter(marker.latitude - 0.0006, marker.longitude);
168-
setEstimateDistance(getTwoPointsDistance(marker.latitude, marker.longitude));
169164
}}
170165
>
171166
<CustomMarkerView

screens/Map/components/BottomDrawer.jsx

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable react/no-array-index-key */
2-
import React, { useMemo } from 'react';
2+
import React from 'react';
33
import {
44
View, Text, TouchableOpacity,
55
} from 'react-native';
@@ -42,12 +42,6 @@ export default function BottomDrawer({
4242
getDirections(data);
4343
};
4444

45-
const dummyData = useMemo(
46-
() => Array(50)
47-
.fill(0)
48-
.map((_, index) => `index-${index}`),
49-
[],
50-
);
5145
return (
5246
<>
5347
<BottomSheet

0 commit comments

Comments
 (0)