Chỉnh sửa giao diện Tour Dashboard

This commit is contained in:
2026-06-13 22:16:27 +07:00
parent 5e3f10631f
commit c7db2c3ed8
11 changed files with 244 additions and 47 deletions
+2
View File
@@ -5,9 +5,11 @@ export const useTourStore = create((set, get) => ({
publicTours: [],
userRole: null,
activeLegId: null,
mapCenter: [10.7769, 106.7009],
setTour: (tour) => set({ currentTour: tour }),
updateLegs: (legs) => set({ legs }),
setActiveLegId: (id) => set({ activeLegId: id }),
setMapCenter: (pos) => set({ mapCenter: pos }),
fetchTour: async (id) => {
const API_BASE = `http://${window.location.hostname}:3001`;
const response = await fetch(`${API_BASE}/api/v1/tours/${id}`);