La pantalla se volvía negra al abrir el dialogo de eliminar carrera

La razón es que se rendereaba un dialogo de borrado por carrera, pero al abrir uno se abrian los demás también
This commit is contained in:
2025-10-24 13:01:33 -06:00
parent 1fe8f2b6a8
commit 8da08b6bf1

View File

@@ -134,7 +134,7 @@ function RouteComponent() {
async () => { async () => {
await qc.invalidateQueries({ queryKey: carrerasKeys.root }) await qc.invalidateQueries({ queryKey: carrerasKeys.root })
router.invalidate() router.invalidate()
setDeleteTarget(null) // setDeleteTarget(null)
} }
) )
@@ -248,7 +248,7 @@ function RouteComponent() {
<Icons.Trash className="w-4 h-4 mr-2" /> Eliminar <Icons.Trash className="w-4 h-4 mr-2" /> Eliminar
</ContextMenuItem> </ContextMenuItem>
</ContextMenuContent> </ContextMenuContent>
{deleteDialog}
</ContextMenu> </ContextMenu>
) )
})} })}
@@ -258,6 +258,8 @@ function RouteComponent() {
</CardContent> </CardContent>
</Card> </Card>
{deleteDialog}
{/* Crear / Editar */} {/* Crear / Editar */}
<CarreraFormDialog <CarreraFormDialog
open={createOpen} open={createOpen}