Sửa lỗi không thể khai báo số lượng chặng

This commit is contained in:
2026-06-15 19:42:45 +07:00
parent 7812d1395b
commit 55f0a8e775
2 changed files with 55 additions and 14 deletions
+1 -8
View File
@@ -241,14 +241,7 @@ export const TourDetailPage = ({ onBack }: { onBack: () => void }) => {
}
}, [publicTours, currentTour, fetchTour]);
// Hàm xử lý khai báo số chặng
const handleDeclareLegs = async () => {
const countStr = window.prompt("Chuyến đi này bạn muốn chia làm bao nhiêu chặng?", "3");
const count = parseInt(countStr || "0");
if (count > 0 && currentTour) {
await initializeLegs(currentTour.id, count);
}
};
// Hàm xử lý các hành động từ Context Menu của bản đồ
const handleMapAction = async (action: string, latlng: L.LatLng) => {