Gán điểm kết thúc của chặng trước làm điểm khởi hành của chặng sau

This commit is contained in:
2026-06-14 10:11:33 +07:00
parent bf63510980
commit ec650fb45d
10 changed files with 111 additions and 16 deletions
+2 -1
View File
@@ -46,7 +46,8 @@ function MapTracker() {
}
export const ExploreMap = ({ onBack, onLogout, user, onViewTour }: { onBack: () => void, onLogout?: () => void, user?: any, onViewTour: (id: string) => void }) => {
const { publicTours, fetchPublicTours, setMapCenter } = useTourStore();
// Thêm fetchTour vào destructuring từ store
const { publicTours, fetchPublicTours, fetchTour, setMapCenter } = useTourStore();
// Khởi tạo vị trí từ localStorage nếu có, nếu không dùng mặc định (TP.HCM)
const [initialViewState] = useState(() => {