update:cors

This commit is contained in:
2026-03-09 21:58:13 +09:00
parent 40448571f0
commit 1f41741450
7 changed files with 551 additions and 149 deletions

View File

@@ -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>
)
}