diff --git a/app/pathways/[pathway]/page.tsx b/app/pathways/[pathway]/page.tsx index 385bc9b..80c9536 100644 --- a/app/pathways/[pathway]/page.tsx +++ b/app/pathways/[pathway]/page.tsx @@ -62,7 +62,7 @@ export default async function Page({ key={contentArea.id} >

{contentArea.title}

-
+
{contentArea.competencies.map((competency) => { return ( diff --git a/app/profile/page.tsx b/app/profile/page.tsx index 08688eb..d93a213 100644 --- a/app/profile/page.tsx +++ b/app/profile/page.tsx @@ -2,7 +2,7 @@ import { Fragment } from 'react'; import { getUserPathways } from '../lib/queries'; import { notFound } from 'next/navigation'; import { caluclateProgress } from '../lib/utilities'; -import { Pathway, Competency } from '../lib/interface'; +import { Pathway, Competency, ContentArea } from '../lib/interface'; import Modal from '@/app/profile/_components/Modal'; import ContentAreaPill from '../_components/ContentAreaPill'; import CompetencyCard from '../_components/CompetencyCard'; @@ -21,16 +21,6 @@ export default async function Page({ const pathways = userPathways.pathways; const showModal = searchParams?.showModal; - const getAllContentAreaForPathway = (pathway: Pathway): string[] => { - const contentAreas = new Set(); - pathway.competencies.forEach((competency: Competency) => { - competency.contentAreas!.forEach((contentArea) => { - contentAreas.add(contentArea.title); - }); - }); - return Array.from(contentAreas) as string[]; - }; - return (
{showModal && } @@ -65,15 +55,16 @@ export default async function Page({ {pathway.description}

- {getAllContentAreaForPathway(pathway).map( - (contentArea: string) => { - return ( - - - - ); - }, - )} + {pathway.contentAreas.map((contentArea: ContentArea) => { + return ( + + + + ); + })}
@@ -90,14 +81,23 @@ export default async function Page({
- {pathway.competencies.map((competency) => { + {pathway.contentAreas.map((contentArea: ContentArea) => { return ( - - - +
+

{contentArea.title}

+
+ {contentArea.competencies.map( + (competency: Competency) => { + return ( + + ); + }, + )} +
+
); })}
diff --git a/prisma/seed.ts b/prisma/seed.ts index 23f6193..84cb000 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -56,7 +56,6 @@ async function main() { }); const pw = process.env.TEST_USER_PW || ''; - console.log('PW IS: ', pw); const hashedPassword = await new Argon2id().hash(pw);