update:cors
This commit is contained in:
@@ -3,13 +3,14 @@ import { Layout } from './components/ui/Layout.tsx'
|
||||
import { Tabs } from './components/ui/Tabs.tsx'
|
||||
import { UserPage } from './pages/UserPage.tsx'
|
||||
import { AdminPage } from './pages/AdminPage.tsx'
|
||||
import { AdminStatsPage } from './pages/AdminStatsPage.tsx'
|
||||
import { LoginPage } from './pages/LoginPage.tsx'
|
||||
import { useAuth } from './hooks/useAuth.ts'
|
||||
import { AuthBar } from './components/ui/AuthBar.tsx'
|
||||
import { BrowserRouter, Route, Routes } from 'react-router-dom'
|
||||
import { NotFound } from './pages/NotFound.tsx'
|
||||
|
||||
type TabValue = 'tickets' | 'admin'
|
||||
type TabValue = 'tickets' | 'admin' | 'stats'
|
||||
|
||||
function SupportApp() {
|
||||
const [activeTab, setActiveTab] = useState<TabValue>('tickets')
|
||||
@@ -41,11 +42,9 @@ function SupportApp() {
|
||||
}
|
||||
|
||||
const tabs: { value: TabValue; label: string }[] = [
|
||||
{
|
||||
value: 'tickets',
|
||||
label: 'My Tickets',
|
||||
},
|
||||
{ value: 'tickets', label: 'My Tickets' },
|
||||
{ value: 'admin', label: 'Admin' },
|
||||
{ value: 'stats', label: 'Admin Stats' },
|
||||
]
|
||||
|
||||
return (
|
||||
@@ -57,6 +56,7 @@ function SupportApp() {
|
||||
<Tabs tabs={tabs} active={activeTab} onChange={setActiveTab} />
|
||||
{activeTab === 'tickets' && <UserPage isAuthenticated={authState === 'authenticated'} />}
|
||||
{activeTab === 'admin' && <AdminPage isAuthenticated={authState === 'authenticated'} user={user} />}
|
||||
{activeTab === 'stats' && <AdminStatsPage isAuthenticated={authState === 'authenticated'} />}
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user