tanyar09 89a63cbf57 feat: Add Help page and enhance user navigation in PunimTag application
This commit introduces a new Help page to the PunimTag application, providing users with detailed guidance on various features and workflows. The navigation has been updated to include the Help page, improving accessibility to support resources. Additionally, the user guide has been refined to remove outdated workflow examples, ensuring clarity and relevance. The Dashboard page has also been streamlined for a cleaner interface. Documentation has been updated to reflect these changes.
2025-11-12 12:13:19 -05:00

68 lines
2.1 KiB
TypeScript

import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
import { AuthProvider, useAuth } from './context/AuthContext'
import { DeveloperModeProvider } from './context/DeveloperModeContext'
import Login from './pages/Login'
import Dashboard from './pages/Dashboard'
import Search from './pages/Search'
import Scan from './pages/Scan'
import Process from './pages/Process'
import Identify from './pages/Identify'
import AutoMatch from './pages/AutoMatch'
import Modify from './pages/Modify'
import Tags from './pages/Tags'
import FacesMaintenance from './pages/FacesMaintenance'
import Settings from './pages/Settings'
import Help from './pages/Help'
import Layout from './components/Layout'
function PrivateRoute({ children }: { children: React.ReactNode }) {
const { isAuthenticated, isLoading } = useAuth()
if (isLoading) {
return <div className="min-h-screen flex items-center justify-center">Loading...</div>
}
return isAuthenticated ? <>{children}</> : <Navigate to="/login" replace />
}
function AppRoutes() {
return (
<Routes>
<Route path="/login" element={<Login />} />
<Route
path="/"
element={
<PrivateRoute>
<Layout />
</PrivateRoute>
}
>
<Route index element={<Dashboard />} />
<Route path="scan" element={<Scan />} />
<Route path="process" element={<Process />} />
<Route path="search" element={<Search />} />
<Route path="identify" element={<Identify />} />
<Route path="auto-match" element={<AutoMatch />} />
<Route path="modify" element={<Modify />} />
<Route path="tags" element={<Tags />} />
<Route path="faces-maintenance" element={<FacesMaintenance />} />
<Route path="settings" element={<Settings />} />
<Route path="help" element={<Help />} />
</Route>
</Routes>
)
}
function App() {
return (
<AuthProvider>
<DeveloperModeProvider>
<BrowserRouter>
<AppRoutes />
</BrowserRouter>
</DeveloperModeProvider>
</AuthProvider>
)
}
export default App