update ui design for all pages

This commit is contained in:
2026-08-12 18:56:56 +05:30
parent 25c4ee4a6a
commit 3beb66059b
58 changed files with 7892 additions and 1891 deletions

View File

@@ -1,4 +1,5 @@
import { Toaster } from "@/components/ui/toaster"
import { Toaster as HotToaster } from 'react-hot-toast';
import { QueryClientProvider } from '@tanstack/react-query'
import { queryClientInstance } from '@/lib/query-client'
import { Navigate, BrowserRouter as Router, Route, Routes, useParams } from 'react-router-dom';
@@ -48,6 +49,12 @@ const LegacyCourseRedirect = () => {
return <Navigate to={`/admin/university/${id}`} replace />;
};
/** `/positions/:id` → the same position inside the Admin shell, id preserved. */
const LegacyPositionRedirect = () => {
const { id } = useParams();
return <Navigate to={`/admin/positions/${id}`} replace />;
};
const AuthenticatedApp = () => {
const { isLoadingAuth, isLoadingPublicSettings } = useAuth();
@@ -96,6 +103,10 @@ const AuthenticatedApp = () => {
{/* Redirect top-level legacy aliases to the unified global shell */}
<Route path="/overview" element={<Navigate to="/admin" replace />} />
<Route path="/positions" element={<Navigate to="/admin/positions" replace />} />
{/* `/positions` only matches the exact path, so the sub-routes need
their own aliases or an inbound link lands on the 404 page. */}
<Route path="/positions/new" element={<Navigate to="/admin/positions/new" replace />} />
<Route path="/positions/:id" element={<LegacyPositionRedirect />} />
<Route path="/candidates" element={<Navigate to="/admin/candidates" replace />} />
<Route path="/hired" element={<Navigate to="/admin/hired" replace />} />
<Route path="/talent-pool" element={<Navigate to="/admin/talent-pool" replace />} />
@@ -123,6 +134,11 @@ function App() {
<AuthenticatedApp />
</Router>
<Toaster />
{/* The design system's `toast` helper wraps react-hot-toast, which needs
its own renderer mounted. Without this every toast in the app fired
into nothing — confirmations, errors and the "not in the demo"
notices all silently did nothing. */}
<HotToaster position="bottom-right" />
</QueryClientProvider>
</AuthProvider>
)