Skip to content

Commit

Permalink
adding flatMap to jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelernestog committed Oct 27, 2024
1 parent 0ef0849 commit 935859d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/empleos/[category]/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function getStaticPaths({ paginate }) {
const response = await fetch(backend_url + "api/jobs/get-all-jobs");
const allJobs = await response.json();
return allCategories.map((categoryObj) => {
return allCategories.flatMap((categoryObj) => {
let filteredJobs =
categoryObj.type == "job"
? allJobs.filter((job) => job[categoryObj.key])
Expand Down

0 comments on commit 935859d

Please sign in to comment.