Skip to content

Commit

Permalink
Merge pull request #6 from arnokamphuis/develop
Browse files Browse the repository at this point in the history
feat: add proffesional roles to competences
  • Loading branch information
FlorisJetses committed May 25, 2023
2 parents 976915d + 67426d3 commit 8066cdc
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/app/competences/[competence]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ export default async function Competencepage({
getCompetence(formatCompetence),
getCompetenceHboI(formatCompetence),
]);
const roles: typeof hboiLinks = Object.entries(hboiLinks).reduce(
(refactoredObject: typeof hboiLinks, [key, values]) => {
values.forEach(value => {
refactoredObject[value] = [...(refactoredObject[value] ?? []), key];
});
return refactoredObject;
},
{}
);
return (
<div className="flex flex-1 items-center justify-center">
<div className="flex flex-col gap-4 max-w-xl card">
Expand Down Expand Up @@ -68,10 +77,10 @@ export default async function Competencepage({
</div>
{hboiLinks && Object.keys(hboiLinks).length > 0 && (
<div>
<h2>HBO-i Beroepstaken</h2>
{Object.keys(hboiLinks).map(link => (
<h2>Hbo-i </h2>
{Object.keys(roles).map(link => (
<p key={link}>
{link}: {hboiLinks[link].join(", ")}
{link}: {roles[link].join(", ")}
</p>
))}
</div>
Expand Down

0 comments on commit 8066cdc

Please sign in to comment.