Skip to content

Commit

Permalink
correccion de errores
Browse files Browse the repository at this point in the history
  • Loading branch information
angelcast2002 committed Sep 27, 2023
1 parent 649882e commit 99e3c54
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions uniEmpleos/src/pages/PrincipalStudent/PrincipalStudent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ const PrincipalStudent = () => {

useEffect(() => {
if (apiPostulations.data) {
setPostulaciones(apiPostulations.data)
const postArray = []
for (const i in apiPostulations.data.postulations) {
postArray.push(apiPostulations.data.postulations[i].id_oferta)
}
setPostulaciones(postArray)
}
}, [apiPostulations.data])

Expand All @@ -82,9 +86,9 @@ const PrincipalStudent = () => {
const regex = new RegExp(carrera)
if (
regex.test(postulation.nombre_carreras) &&
carrera !== "" &&
postulaciones.id_oferta &&
!(postulation.id_oferta in postulaciones.id_oferta)
carrera !== "" &&
postulaciones &&
!(postulaciones.includes(postulation.id_oferta))
) {
return (
<InfoTab
Expand Down

0 comments on commit 99e3c54

Please sign in to comment.