fix: gộp các nút thành viên và bỏ MemberDashboard

This commit is contained in:
2026-06-27 16:53:19 +07:00
parent 400a3d098d
commit 4ee46371fa
14 changed files with 2638 additions and 497 deletions
+10 -2
View File
@@ -37,13 +37,15 @@ interface MemberDashboardProps {
onExploreTours: () => void;
onViewTour: (tourId: string, fromPage?: 'explore' | 'dashboard') => void;
onOpenMyPhotos: () => void;
initialTab?: 'tours' | 'connections' | 'photos' | 'chats';
}
export const MemberDashboard: React.FC<MemberDashboardProps> = ({
user,
onLogout,
onExploreTours,
onViewTour
onViewTour,
initialTab,
}) => {
// GUARD: Prevent guest users from accessing dashboard
const guestToken = localStorage.getItem('guest_token');
@@ -68,7 +70,13 @@ export const MemberDashboard: React.FC<MemberDashboardProps> = ({
const publicTours = useTourStore(state => state.publicTours);
const fetchPublicTours = useTourStore(state => state.fetchPublicTours);
const [activeTab, setActiveTab] = useState<'tours' | 'connections' | 'photos' | 'chats'>('tours');
const [activeTab, setActiveTab] = useState<'tours' | 'connections' | 'photos' | 'chats'>(initialTab || 'tours');
useEffect(() => {
if (initialTab) {
setActiveTab(initialTab);
}
}, [initialTab]);
const [connectionSubTab, setConnectionSubTab] = useState<'list' | 'search' | 'pending'>('list');
// Connection states