diff --git a/frontend/src/pages/ExploreMap.tsx b/frontend/src/pages/ExploreMap.tsx
index 4e1208e..2502d56 100644
--- a/frontend/src/pages/ExploreMap.tsx
+++ b/frontend/src/pages/ExploreMap.tsx
@@ -78,6 +78,7 @@ export const ExploreMap = ({ onBack, onLogout, user, onViewTour }: { onBack: ()
const [mapZoom] = useState(initialViewState?.zoom || 13);
const [isAdminModalOpen, setIsAdminModalOpen] = useState(false);
const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);
+ const [isFilterDropdownOpen, setIsFilterDropdownOpen] = useState(false); // State để điều khiển hiển thị dropdown lọc
const [searchQuery, setSearchQuery] = useState(''); // State cho giá trị tìm kiếm
const [suggestions, setSuggestions] = useState<{ type: 'tour' | 'location', id: string, name: string, lat?: number, lon?: number }[]>([]);
const [isSearchingSuggestions, setIsSearchingSuggestions] = useState(false);
@@ -228,6 +229,44 @@ export const ExploreMap = ({ onBack, onLogout, user, onViewTour }: { onBack: ()
+ {/* Nút lọc Tag và Dropdown */}
+
+
setIsFilterDropdownOpen(prev => !prev)}
+ className="bg-white p-3 rounded-full shadow-xl hover:bg-gray-50 transition-all border border-gray-100 flex items-center justify-center"
+ title="Lọc theo loại"
+ >
+
+
+
+ {/* Filter Dropdown Content */}
+ {isFilterDropdownOpen && (
+
+
+
+ Lọc theo loại
+
+
{/* Hiển thị tag theo chiều dọc */}
+ { setSelectedFilterTag(null); setIsFilterDropdownOpen(false); }}
+ className={`px-2.5 py-1 rounded-lg text-[10px] font-bold transition-all ${!selectedFilterTag ? 'bg-blue-600 text-white' : 'bg-gray-100 text-gray-500 hover:bg-gray-200'}`}
+ >
+ Tất cả
+
+ {allFilterTags.map(tag => (
+ { setSelectedFilterTag(tag === selectedFilterTag ? null : tag); setIsFilterDropdownOpen(false); }}
+ className={`px-2.5 py-1 rounded-lg text-[10px] font-bold transition-all ${selectedFilterTag === tag ? 'bg-blue-600 text-white' : 'bg-gray-100 text-gray-500 hover:bg-gray-200'}`}
+ >
+ {tag}
+
+ ))}
+
+
+ )}
+
+
{/* Search Box - Thay thế div "Khám phá khu vực" */}
@@ -310,28 +349,6 @@ export const ExploreMap = ({ onBack, onLogout, user, onViewTour }: { onBack: ()
- {/* Ribbon lọc theo Tag - Đặt ngay dưới top-bar, có thể cuộn ngang */}
-
-
-
- setSelectedFilterTag(null)}
- className={`px-3 py-1.5 rounded-full text-xs font-bold transition-all flex-shrink-0 ${!selectedFilterTag ? 'bg-blue-600 text-white' : 'bg-gray-100 text-gray-600 hover:bg-gray-200'}`}
- >
- Tất cả
-
- {allFilterTags.map(tag => (
- setSelectedFilterTag(tag === selectedFilterTag ? null : tag)}
- className={`px-3 py-1.5 rounded-full text-xs font-bold transition-all flex-shrink-0 ${selectedFilterTag === tag ? 'bg-blue-600 text-white' : 'bg-gray-100 text-gray-600 hover:bg-gray-200'}`}
- >
- {tag}
-
- ))}
-
-
-
-
- {/* Đóng menu khi tương tác bản đồ */}
- { setShareMenu(null); setSuggestions([]); }} />
+ {/* Đóng menu và dropdown khi tương tác bản đồ */}
+ { setShareMenu(null); setSuggestions([]); setIsFilterDropdownOpen(false); }} />
{/* Tự động di chuyển bản đồ đến vị trí người dùng khi tìm thấy tọa độ */}