From 32caa477e4e27cfd52c4212478b5a578a75434be Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 11 Oct 2025 16:19:52 +0000 Subject: [PATCH] Refactor: Remove unused Tabs component --- src/pages/dashboard/ChannelManager.tsx | 43 ++++---------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/src/pages/dashboard/ChannelManager.tsx b/src/pages/dashboard/ChannelManager.tsx index 5b37455..1978d1c 100644 --- a/src/pages/dashboard/ChannelManager.tsx +++ b/src/pages/dashboard/ChannelManager.tsx @@ -1,7 +1,6 @@ import React, { useState, useEffect } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; -import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { Input } from '@/components/ui/input'; @@ -66,20 +65,7 @@ const ChannelManager = () => { // Get active tab from URL or default to 'overview' const queryParams = new URLSearchParams(location.search); - const urlTab = queryParams.get('tab') || 'overview'; - const [activeTab, setActiveTab] = useState(urlTab); - - // Update active tab when URL changes - useEffect(() => { - const newTab = queryParams.get('tab') || 'overview'; - setActiveTab(newTab); - }, [location.search]); - - // Update URL when tab changes - const handleTabChange = (newTab: string) => { - setActiveTab(newTab); - navigate(`/dashboard/channel-manager?tab=${newTab}`); - }; + const activeTab = queryParams.get('tab') || 'overview'; const [searchTerm, setSearchTerm] = useState(''); const [filterType, setFilterType] = useState('all'); @@ -712,28 +698,11 @@ const ChannelManager = () => {

- - - - - - - - - - - - - - - - - - - - - - + {activeTab === 'overview' && } + {activeTab === 'channels' && } + {activeTab === 'listings' && } + {activeTab === 'reservations' && } + {activeTab === 'analytics' && } {/* Modals */}