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

@@ -123,6 +123,8 @@ export async function plans_list(
}
export async function plans_get(planId: UUID): Promise<PlanEstudio> {
console.log('plans_get')
const supabase = supabaseBrowser()
const { data, error } = await supabase
@@ -350,7 +352,7 @@ export async function plans_update_fields(
patch: PlansUpdateFieldsPatch,
): Promise<PlanEstudio> {
const supabase = supabaseBrowser()
const { data, error } = await supabase
.from('planes_estudio')
.update(patch)

View File

@@ -53,7 +53,10 @@ export function usePlanes(filters: PlanListFilters) {
export function usePlan(planId: UUID | null | undefined) {
return useQuery({
queryKey: planId ? qk.plan(planId) : ['planes', 'detail', null],
queryFn: () => plans_get(planId as UUID),
queryFn: () => {
console.log('usePlan')
return plans_get(planId as UUID)
},
enabled: Boolean(planId),
})
}