Fallback elegante de vista no encontrada

close #44:
Se creó la NotFoundPage y se utiliza en __root con el notFoundComponent.
Se agregó la lógica del loader tanto de plan de estudios como de asignaturas.
Se agregó el NotFoundComponent para el detalle de plan de estudios y el de asignaturas
This commit is contained in:
2026-01-28 12:56:08 -06:00
parent ddb3a5023c
commit 35ea4caa39
10 changed files with 136 additions and 29 deletions

View File

@@ -7,6 +7,8 @@ import TanStackQueryDevtools from '../integrations/tanstack-query/devtools'
import type { QueryClient } from '@tanstack/react-query'
import { NotFoundPage } from '@/components/ui/NotFoundPage'
interface MyRouterContext {
queryClient: QueryClient
}
@@ -31,6 +33,8 @@ export const Route = createRootRouteWithContext<MyRouterContext>()({
</>
),
notFoundComponent: () => <NotFoundPage />,
errorComponent: ({ error, reset }) => {
return (
<div className="flex min-h-[50vh] flex-col items-center justify-center space-y-4 p-6 text-center">