diff --git a/src/app/private/[uid]/user/home/page.tsx b/src/app/private/[uid]/user/home/page.tsx index 774ed703..506cb40b 100644 --- a/src/app/private/[uid]/user/home/page.tsx +++ b/src/app/private/[uid]/user/home/page.tsx @@ -25,9 +25,16 @@ const UserHomePage = async ({ params }: UserHomePageParams) => { include: { students: { where: { - position: { - not: "", - }, + OR: [ + { + position: { + not: "", + }, + }, + { + role: "CHAPTER_LEADER", + }, + ], }, }, }, diff --git a/src/components/DisplayChapterInfo.tsx b/src/components/DisplayChapterInfo.tsx index 864ffa32..d1b3127c 100644 --- a/src/components/DisplayChapterInfo.tsx +++ b/src/components/DisplayChapterInfo.tsx @@ -69,7 +69,7 @@ const DisplayChapterInfo = ({ ); })} @@ -91,15 +91,15 @@ const DisplayChapterInfo = ({ : "Executive Board"} } - tiles={students.map((student) => ( - - ))} + tiles={students.map((student) => { + const link = + user.role === "USER" + ? "" + : `/private/${user.id}/${RoleToUrlSegment[user.role]}` + + `${user.role === "ADMIN" && `/home/chapters/${chapter.id}`}` + + `/users/${student.id}`; + return ; + })} />